Are Fresnel lenses widely used for solar electricity? If not, why not? –
physics.stackexchange.com
I was just wondering why Fresnel Lenses are not widely used in the
production of solar electricity. Their use there would mean that you could
produce heat within a fraction of a second, up to a few …
Monday, 30 September 2013
What's going on with "Potential Stack Overflow Revenue Models"? meta.stackoverflow.com
What's going on with "Potential Stack Overflow Revenue Models"? –
meta.stackoverflow.com
There is a deleted question that has been linked to by this post, and from
the title, it seems to be of historical significance. However, I don't
have 10k, so I will need someone else to read it for …
meta.stackoverflow.com
There is a deleted question that has been linked to by this post, and from
the title, it seems to be of historical significance. However, I don't
have 10k, so I will need someone else to read it for …
Hotkey control keycodes confusion
Hotkey control keycodes confusion
HKM_GETHOTEKY returns virtual key code and modifiers but they're not the
same as the ordinary virtual key codes? What is the purpose of HOTKEYF_EXT
and how do i use it?
If i press F5 the hotkey control returns 0x74 which is VK_F5, but when i
press the right arrow key, it returns 0x27 which is VK_RIGHT and the
HOTKEYF_EXT bit is set on the modifier. If i use HKM_SETHOTKEY with
VK_RIGHT as virtual key and no modifiers, it shows "Num 6"
I find this very strange and I need to be able to pass any virtual keys to
the hotkey control window, and therefore i need to understand this
HOTKEYF_EXT modifier.
HKM_GETHOTEKY returns virtual key code and modifiers but they're not the
same as the ordinary virtual key codes? What is the purpose of HOTKEYF_EXT
and how do i use it?
If i press F5 the hotkey control returns 0x74 which is VK_F5, but when i
press the right arrow key, it returns 0x27 which is VK_RIGHT and the
HOTKEYF_EXT bit is set on the modifier. If i use HKM_SETHOTKEY with
VK_RIGHT as virtual key and no modifiers, it shows "Num 6"
I find this very strange and I need to be able to pass any virtual keys to
the hotkey control window, and therefore i need to understand this
HOTKEYF_EXT modifier.
simple coursor adapter with sqlite database and custmize listview
simple coursor adapter with sqlite database and custmize listview
i m confused here where is the actual error .i want to display the record
from sqlite db in to listview using simple coursor adapter .there is no
fild like _id in my sqlite databas !! but the error is regarding that,
which i mention below: Error:
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.blundell.tut/com.blundell.tut.ui.phone.update_page}:
java.lang.IllegalArgumentException: column '_id' does not exist
my java files are mention here..thanx in advance and if any suggestion
then plz comment it.
update_page.java
public class update_page extends Activity
{
DatabaseHandler db = new DatabaseHandler(this);
public String tableName = db.TABLE_CONTACTS;
public String databaseName = db.DATABASE_NAME;
public String task_name = db.KEY_TASK;
public String dt = db.KEY_DATETIME;
private ArrayList<String> results = new ArrayList<String>();
private ArrayList<String> results2 = new ArrayList<String>();
Intent op_intent;
SQLiteDatabase database;
ListView myview;
Cursor c;
String o_name,o_no1;
//String o_id1 = null;
HttpClient client;
Integer op_id,status;
String url;
Context ctx;
Intent myintent;
final MainActivity act = new MainActivity();
public void onCreate(Bundle savedInstanceState)
{
ctx=this;
database = act.getInstance().openOrCreateDatabase("contactsManager",
SQLiteDatabase.CREATE_IF_NECESSARY, null);
Toast.makeText(getApplicationContext(), "Database is open",
1500).show();
final String[] columnsone={"id","task_name","date_time"};
String[] columnstwo={"task_name","date_time"};
int to[] = {R.id.lbl_task,R.id.lbl_datetime};
c = database.query("contacts", columnsone, null, null, null,
null, null);
status=c.getCount();
if(status==0)
{
AlertDialog.Builder alertDialogBuilder = new
AlertDialog.Builder(ctx);
// set title
alertDialogBuilder.setTitle("No task are created !!");
// set dialog message
alertDialogBuilder
.setMessage("Click cancle to exit!")
.setCancelable(false)
.setNegativeButton("Cancle",
new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface
dialog,
int id) {
// if this button is clicked, just
close
// the dialog box and do nothing
dialog.cancel();
myintent = new
Intent(update_page.this,MainActivity.class);
startActivity(myintent);
}
});
// create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create();
// show it
alertDialog.show();
}
else
{
Toast.makeText(getApplicationContext(), "records are
available in courser", 1500).show();
if(c!=null)
{
Toast.makeText(getApplicationContext(), "in courser",
1500).show();
SimpleCursorAdapter adapter=new
SimpleCursorAdapter(this.ctx,R.layout.update_listview,
c, columnstwo, to);
Toast.makeText(getApplicationContext(), "records are in
list", 1500).show();
myview.setAdapter(adapter);
}
}
update_list.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<!-- <ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#404040"
android:fillViewport="true" > -->
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.68"
android:divider="#000000"
android:dividerHeight="2dp"
android:background="#404040">
</ListView>
<!-- </ScrollView> -->
</LinearLayout>
**update_listview.xml**
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/lbl_task"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Medium Text"
android:textColor="#1E90FF"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/lbl_datetime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
i m confused here where is the actual error .i want to display the record
from sqlite db in to listview using simple coursor adapter .there is no
fild like _id in my sqlite databas !! but the error is regarding that,
which i mention below: Error:
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.blundell.tut/com.blundell.tut.ui.phone.update_page}:
java.lang.IllegalArgumentException: column '_id' does not exist
my java files are mention here..thanx in advance and if any suggestion
then plz comment it.
update_page.java
public class update_page extends Activity
{
DatabaseHandler db = new DatabaseHandler(this);
public String tableName = db.TABLE_CONTACTS;
public String databaseName = db.DATABASE_NAME;
public String task_name = db.KEY_TASK;
public String dt = db.KEY_DATETIME;
private ArrayList<String> results = new ArrayList<String>();
private ArrayList<String> results2 = new ArrayList<String>();
Intent op_intent;
SQLiteDatabase database;
ListView myview;
Cursor c;
String o_name,o_no1;
//String o_id1 = null;
HttpClient client;
Integer op_id,status;
String url;
Context ctx;
Intent myintent;
final MainActivity act = new MainActivity();
public void onCreate(Bundle savedInstanceState)
{
ctx=this;
database = act.getInstance().openOrCreateDatabase("contactsManager",
SQLiteDatabase.CREATE_IF_NECESSARY, null);
Toast.makeText(getApplicationContext(), "Database is open",
1500).show();
final String[] columnsone={"id","task_name","date_time"};
String[] columnstwo={"task_name","date_time"};
int to[] = {R.id.lbl_task,R.id.lbl_datetime};
c = database.query("contacts", columnsone, null, null, null,
null, null);
status=c.getCount();
if(status==0)
{
AlertDialog.Builder alertDialogBuilder = new
AlertDialog.Builder(ctx);
// set title
alertDialogBuilder.setTitle("No task are created !!");
// set dialog message
alertDialogBuilder
.setMessage("Click cancle to exit!")
.setCancelable(false)
.setNegativeButton("Cancle",
new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface
dialog,
int id) {
// if this button is clicked, just
close
// the dialog box and do nothing
dialog.cancel();
myintent = new
Intent(update_page.this,MainActivity.class);
startActivity(myintent);
}
});
// create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create();
// show it
alertDialog.show();
}
else
{
Toast.makeText(getApplicationContext(), "records are
available in courser", 1500).show();
if(c!=null)
{
Toast.makeText(getApplicationContext(), "in courser",
1500).show();
SimpleCursorAdapter adapter=new
SimpleCursorAdapter(this.ctx,R.layout.update_listview,
c, columnstwo, to);
Toast.makeText(getApplicationContext(), "records are in
list", 1500).show();
myview.setAdapter(adapter);
}
}
update_list.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<!-- <ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#404040"
android:fillViewport="true" > -->
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.68"
android:divider="#000000"
android:dividerHeight="2dp"
android:background="#404040">
</ListView>
<!-- </ScrollView> -->
</LinearLayout>
**update_listview.xml**
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/lbl_task"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:text="Medium Text"
android:textColor="#1E90FF"
android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/lbl_datetime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="3dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="10dp"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</LinearLayout>
Sunday, 29 September 2013
There is no build provider registered for the extension '.dll'.
There is no build provider registered for the extension '.dll'.
I'm trying to reference to a .dll file from a .aspx web page. However, I
get the following error:
Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: There is no build provider registered for the
extension '.dll'. You can register one in the
<compilation><buildProviders> section in machine.config or web.config.
Make sure is has a BuildProviderAppliesToAttribute attribute which
includes the value 'Web' or 'All'.
Source Error:
Line 2: <%@ Page Title="" Language="C#"
MasterPageFile="CSharpBPTestMaster.master" AutoEventWireup="true"
CodeFile="CSharpBPTest.aspx.cs" Inherits="Button" Debug="true"%>
Line 3:
Line 4: <%@ Register tagprefix="blnc" tagname="Balanced"
src="bin/Debug/BalancedTest.dll" %>
Line 5:
Line 6:
Source File:
/preview/1/balanced-csharp-master/src/BalancedTest/CSharpBPTest.aspx
Line: 4
I'm not sure what I'm doing wrong. I build the .csproj file. I have the
following in bin\Debug\:
Balanced.dll
Balanced.pdb
BalancedTest.dll
BalancedTest.pdb
Here is my CSharpBPTest.aspx:
<%@ Page Title="" Language="C#"
MasterPageFile="CSharpBPTestMaster.master" AutoEventWireup="true"
CodeFile="CSharpBPTest.aspx.cs" Inherits="Button" Debug="true"%>
<%@ Register tagprefix="blnc" tagname="Balanced"
src="bin/Debug/BalancedTest.dll" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<form id="form1" runat="server">
<div>
<asp:Button ID="button1" runat="server" Text="Submit"
OnClick="Button_Command"/>
<br />
<br />
<br><asp:label id="warningLabel" Text="" ForeColor="Red"
runat="server"/><br>
<br />
</div>
</form>
</asp:Content>
And in my C# file, I "import" the project like this (at the top):
using Balanced;
I want to be able to use this compiled .dll file on my C# side. The
Balanced.dll is an external library. It just came with the files and a
.csproj file. I did a build and now I'm trying to use this Balanced.dll
file. Am I missing something? I'm sorry if this is a bad question. I'm new
to asp.net and csproj.
I'm trying to reference to a .dll file from a .aspx web page. However, I
get the following error:
Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: There is no build provider registered for the
extension '.dll'. You can register one in the
<compilation><buildProviders> section in machine.config or web.config.
Make sure is has a BuildProviderAppliesToAttribute attribute which
includes the value 'Web' or 'All'.
Source Error:
Line 2: <%@ Page Title="" Language="C#"
MasterPageFile="CSharpBPTestMaster.master" AutoEventWireup="true"
CodeFile="CSharpBPTest.aspx.cs" Inherits="Button" Debug="true"%>
Line 3:
Line 4: <%@ Register tagprefix="blnc" tagname="Balanced"
src="bin/Debug/BalancedTest.dll" %>
Line 5:
Line 6:
Source File:
/preview/1/balanced-csharp-master/src/BalancedTest/CSharpBPTest.aspx
Line: 4
I'm not sure what I'm doing wrong. I build the .csproj file. I have the
following in bin\Debug\:
Balanced.dll
Balanced.pdb
BalancedTest.dll
BalancedTest.pdb
Here is my CSharpBPTest.aspx:
<%@ Page Title="" Language="C#"
MasterPageFile="CSharpBPTestMaster.master" AutoEventWireup="true"
CodeFile="CSharpBPTest.aspx.cs" Inherits="Button" Debug="true"%>
<%@ Register tagprefix="blnc" tagname="Balanced"
src="bin/Debug/BalancedTest.dll" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<form id="form1" runat="server">
<div>
<asp:Button ID="button1" runat="server" Text="Submit"
OnClick="Button_Command"/>
<br />
<br />
<br><asp:label id="warningLabel" Text="" ForeColor="Red"
runat="server"/><br>
<br />
</div>
</form>
</asp:Content>
And in my C# file, I "import" the project like this (at the top):
using Balanced;
I want to be able to use this compiled .dll file on my C# side. The
Balanced.dll is an external library. It just came with the files and a
.csproj file. I did a build and now I'm trying to use this Balanced.dll
file. Am I missing something? I'm sorry if this is a bad question. I'm new
to asp.net and csproj.
bash backup script error
bash backup script error
So I'm writing a simple backup script that when called will either back up
a specific file or all the files in my current directory into my backup
directory. This is my script
#!/bin/bash
#verify if $1 is empty, if so, copy all content to backup directory
if [ -z "$1" ] then
$files=ls
#Looping through files
for file in $files
do
cp $file ../backup/
done
#else copy files specified
else
$files=ls $1
#Looping through files
for file in $files
do
cp $file ../backup/
done
fi
and the only error I'm getting is: ./backup: line 7: =ls: command not found
I'm not sure why the script won't recognize ls as a command. Any ideas?
So I'm writing a simple backup script that when called will either back up
a specific file or all the files in my current directory into my backup
directory. This is my script
#!/bin/bash
#verify if $1 is empty, if so, copy all content to backup directory
if [ -z "$1" ] then
$files=ls
#Looping through files
for file in $files
do
cp $file ../backup/
done
#else copy files specified
else
$files=ls $1
#Looping through files
for file in $files
do
cp $file ../backup/
done
fi
and the only error I'm getting is: ./backup: line 7: =ls: command not found
I'm not sure why the script won't recognize ls as a command. Any ideas?
How to synchronize different java programs to access a common resource
How to synchronize different java programs to access a common resource
I am trying to synchronize instances of a class that access a common
resource(database). This can be done by using notify and wait() but i need
to know that if different java programs are using this class for creating
instances than how can synchronize them. Thank you
I am trying to synchronize instances of a class that access a common
resource(database). This can be done by using notify and wait() but i need
to know that if different java programs are using this class for creating
instances than how can synchronize them. Thank you
Subscribe to:
Posts (Atom)