PostId
int64 13
11.8M
| PostCreationDate
stringlengths 19
19
| OwnerUserId
int64 3
1.57M
| OwnerCreationDate
stringlengths 10
19
| ReputationAtPostCreation
int64 -33
210k
| OwnerUndeletedAnswerCountAtPostTime
int64 0
5.77k
| Title
stringlengths 10
250
| BodyMarkdown
stringlengths 12
30k
| Tag1
stringlengths 1
25
⌀ | Tag2
stringlengths 1
25
⌀ | Tag3
stringlengths 1
25
⌀ | Tag4
stringlengths 1
25
⌀ | Tag5
stringlengths 1
25
⌀ | PostClosedDate
stringlengths 19
19
⌀ | OpenStatus
stringclasses 5
values | unified_texts
stringlengths 47
30.1k
| OpenStatus_id
int64 0
4
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,571,664 | 05/13/2012 12:19:49 | 1,392,139 | 05/13/2012 12:12:05 | 1 | 0 | Resize image without blurriness | I am creating a web app for Minecraft, and I need to grab someones skin, and resize it without the blurriness. Maybe some javascript or something can help with this problem. | javascript | css | image | web-applications | minecraft | 05/14/2012 12:03:43 | not a real question | Resize image without blurriness
===
I am creating a web app for Minecraft, and I need to grab someones skin, and resize it without the blurriness. Maybe some javascript or something can help with this problem. | 1 |
4,714,223 | 01/17/2011 14:23:39 | 690,906 | 01/17/2011 14:23:39 | 1 | 0 | System.Data.SqlClient.SqlClientPermission error | I am getting following error
**"Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. "** while using sql connection in sandboxed solution in SharePoint 2010.I edited WSS_Minimal file, tried with Trust Level="Full". But still not able to rectify the error. Any Help will be appreciated.
Thanks in Advance<br>
Anoop Thomas
| sharepoint2010 | null | null | null | null | null | open | System.Data.SqlClient.SqlClientPermission error
===
I am getting following error
**"Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. "** while using sql connection in sandboxed solution in SharePoint 2010.I edited WSS_Minimal file, tried with Trust Level="Full". But still not able to rectify the error. Any Help will be appreciated.
Thanks in Advance<br>
Anoop Thomas
| 0 |
4,148,601 | 11/10/2010 20:10:45 | 115,690 | 06/01/2009 23:08:37 | 609 | 24 | Automatic way to move Visual Studio project into LINQPad? | I thoroughly enjoy the amazing power of LINQPAD (thanks, [Joseph Albahari][1]!) and particularly LINQPad's `Dump` method. Frequently I take an existing Visual Studio project and move it into LINQPad for the sole purpose of adding a couple Dump statements to see what the data looks like--though Visual Studio's data popups are certainly useful, the Dump output is just much easier to digest. To do this, I open each file I need from the current project, copy and paste the individual classes over to LINQPad, add assemblies and using statements, attempt to run so that LINQPad will tell me what I missed, and repeat until I find all the orphan references.
This method seems antithetical to the elegant, streamlined nature of LINQPad. Is there an easier way? Any chance of seeing "*Import Project*" on LINQPad's File menu any time soon? If not, I may end up writing a utility myself...
[1]: http://www.albahari.com/ | visual-studio-2010 | linqpad | null | null | null | null | open | Automatic way to move Visual Studio project into LINQPad?
===
I thoroughly enjoy the amazing power of LINQPAD (thanks, [Joseph Albahari][1]!) and particularly LINQPad's `Dump` method. Frequently I take an existing Visual Studio project and move it into LINQPad for the sole purpose of adding a couple Dump statements to see what the data looks like--though Visual Studio's data popups are certainly useful, the Dump output is just much easier to digest. To do this, I open each file I need from the current project, copy and paste the individual classes over to LINQPad, add assemblies and using statements, attempt to run so that LINQPad will tell me what I missed, and repeat until I find all the orphan references.
This method seems antithetical to the elegant, streamlined nature of LINQPad. Is there an easier way? Any chance of seeing "*Import Project*" on LINQPad's File menu any time soon? If not, I may end up writing a utility myself...
[1]: http://www.albahari.com/ | 0 |
5,944,073 | 05/10/2011 00:56:44 | 685,750 | 03/31/2011 12:49:53 | 93 | 11 | Use eval without threat of XSS | I was making(not now, but still I'm curious about this one) a game using HTML5 and JS, and one I wanted was that people can insert custom script, but secure.
function executeCustomJS(code){
eval(code);//bad
}
Of course this code is very bad, because if code is something like `document.location.href='http://meatspn.com'`, then the result will become very...(...)
One solution I found is escaping(like `eval` -> `___eval___`) all keywords, and un-escape keywords in whitelist, such as 'while', 'for', 'if', 'var', 'true', 'false', ... and 'func0', 'func1', ...., which are something (like API) of the game and are secure.
For example,
function executeCustomJS(code){
code = code.replace(/(Keyword RegEx)/g,'___$1___');
/*unescape keywords in whitelist*/
eval(code);
}
I haven't made RegEx and things in comment, but that's not the question.
Let's assume strings in code are not escaped, there's no function which can be made by escaping a string, and 'eval', 'window', 'document', 'alert', 'location' are NOT in the whitelist. Still some people can execute code like `while(true){}`, they can't execute any code like `document.location.href='http://meatspn.com'`.
Is this method secure? Or, is better way exists or not? | javascript | security | xss | eval | null | null | open | Use eval without threat of XSS
===
I was making(not now, but still I'm curious about this one) a game using HTML5 and JS, and one I wanted was that people can insert custom script, but secure.
function executeCustomJS(code){
eval(code);//bad
}
Of course this code is very bad, because if code is something like `document.location.href='http://meatspn.com'`, then the result will become very...(...)
One solution I found is escaping(like `eval` -> `___eval___`) all keywords, and un-escape keywords in whitelist, such as 'while', 'for', 'if', 'var', 'true', 'false', ... and 'func0', 'func1', ...., which are something (like API) of the game and are secure.
For example,
function executeCustomJS(code){
code = code.replace(/(Keyword RegEx)/g,'___$1___');
/*unescape keywords in whitelist*/
eval(code);
}
I haven't made RegEx and things in comment, but that's not the question.
Let's assume strings in code are not escaped, there's no function which can be made by escaping a string, and 'eval', 'window', 'document', 'alert', 'location' are NOT in the whitelist. Still some people can execute code like `while(true){}`, they can't execute any code like `document.location.href='http://meatspn.com'`.
Is this method secure? Or, is better way exists or not? | 0 |
8,867,262 | 01/15/2012 03:03:42 | 350,106 | 07/06/2009 15:35:01 | 4,118 | 350 | How do I launch the default web browser in Perl on any operating system? | I want to open a URL, such as http://www.google.com/, at the end of a Perl script. I don't want to access it with WWW::Mechanize but actually show the web page to the user in a graphical web browser.
There are ways to do this in Mac (`open URL`) and Windows, but I want a solution that works on any operating system, not just one. | perl | url | webbrowser | default | null | null | open | How do I launch the default web browser in Perl on any operating system?
===
I want to open a URL, such as http://www.google.com/, at the end of a Perl script. I don't want to access it with WWW::Mechanize but actually show the web page to the user in a graphical web browser.
There are ways to do this in Mac (`open URL`) and Windows, but I want a solution that works on any operating system, not just one. | 0 |
817,870 | 05/03/2009 20:07:28 | 56,555 | 01/19/2009 04:24:38 | 1,869 | 75 | What is the best FREE programming books available for a C# dev? | So what is the best <b>FREE</b> available for a C# dev? Also if you have any really good books that aren't really related to C# but are still programming related fell free to post them also.
**Just one rule:** It has to be <b>legal</b> to download. I don't want illegal books on my HDD. | c# | ebook | free | null | null | 10/02/2011 00:43:54 | not constructive | What is the best FREE programming books available for a C# dev?
===
So what is the best <b>FREE</b> available for a C# dev? Also if you have any really good books that aren't really related to C# but are still programming related fell free to post them also.
**Just one rule:** It has to be <b>legal</b> to download. I don't want illegal books on my HDD. | 4 |
11,578,723 | 07/20/2012 11:47:09 | 17,507 | 09/18/2008 10:22:55 | 1,699 | 61 | What's the best way in elisp to trap an error case | I'm trying to augment the etags-select functions so it will fall-back to a normal find-tag if find-tag at point failed. The code I've tried is:
(defun my-etags-find-tag ()
"Find at point or fall back"
(interactive)
(unless (etags-select-find-tag-at-point)
(etags-select-find-tag)))
(global-set-key (kbd "C-f") 'my-etags-find-tag)
However this fails when *point* is not at a valid tag. Instead I get a error thrown by etags-select-find-tag-at-point:
etags-select-find-tag-at-point: Wrong type argument: char-or-string-p, nil
In this case I just have to repeat the test done by *etags-select-find-tag-at-point*:
(defun my-etags-find-tag ()
"Find at point or fall back"
(interactive)
(if (find-tag-default)
(etags-select-find-tag-at-point)
(etags-select-find-tag)))
But it does seem a little redundant. Is it possible to trap exceptions and do alternate processing in elisp? | emacs | elisp | null | null | null | null | open | What's the best way in elisp to trap an error case
===
I'm trying to augment the etags-select functions so it will fall-back to a normal find-tag if find-tag at point failed. The code I've tried is:
(defun my-etags-find-tag ()
"Find at point or fall back"
(interactive)
(unless (etags-select-find-tag-at-point)
(etags-select-find-tag)))
(global-set-key (kbd "C-f") 'my-etags-find-tag)
However this fails when *point* is not at a valid tag. Instead I get a error thrown by etags-select-find-tag-at-point:
etags-select-find-tag-at-point: Wrong type argument: char-or-string-p, nil
In this case I just have to repeat the test done by *etags-select-find-tag-at-point*:
(defun my-etags-find-tag ()
"Find at point or fall back"
(interactive)
(if (find-tag-default)
(etags-select-find-tag-at-point)
(etags-select-find-tag)))
But it does seem a little redundant. Is it possible to trap exceptions and do alternate processing in elisp? | 0 |
11,475,338 | 07/13/2012 17:22:22 | 236,499 | 12/22/2009 01:41:35 | 471 | 24 | Maximum of tables a SQLite database file supports | Even after reading [SQLite limits][1] I could not find the **maximum number of tables** a SQLite database file can hold. So, I'd like to know if
1. There is a maximum number of tables a SQLite database can hold?
2. It is an issue to have thousands of small tables in a SQLite database file?
3. Many tables in a SQLite database file can impact performance of queries?
[1]: http://www.sqlite.org/limits.html | sql | database | sqlite | sqlite3 | null | null | open | Maximum of tables a SQLite database file supports
===
Even after reading [SQLite limits][1] I could not find the **maximum number of tables** a SQLite database file can hold. So, I'd like to know if
1. There is a maximum number of tables a SQLite database can hold?
2. It is an issue to have thousands of small tables in a SQLite database file?
3. Many tables in a SQLite database file can impact performance of queries?
[1]: http://www.sqlite.org/limits.html | 0 |
1,558,908 | 10/13/2009 08:31:51 | 86,038 | 04/02/2009 06:42:21 | 302 | 10 | how to pass datagrid row values from one mxml component to another in Flex? | I have an mxml component with an empty datagrid. I also have a button,which on clicking, opens a pop up window.
This is the code for that:
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" >
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.core.IFlexDisplayObject;
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
//Datagrid
[Bindable]
private var defectDetails:ArrayCollection = new ArrayCollection([
{Select:true},
]);
private function projDocsPopUp():void{
var helpWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, projDocsLookUp, true));
helpWindow.title="Project Documents List";
}
]]>
</mx:Script>
<mx:Panel width="100%" height="50%" layout="vertical" title="Defect Details" >
<mx:DataGrid id="defectDG" dataProvider="{defectDetails}" variableRowHeight="true" width="100%" height="75" >
<mx:columns>
<mx:DataGridColumn dataField="Select" itemRenderer="mx.controls.CheckBox" width="50" textAlign="center" />
<mx:DataGridColumn dataField="Defect Id" itemRenderer="mx.controls.TextInput" textAlign="center"/>
<mx:DataGridColumn dataField="Status" itemRenderer="mx.controls.ComboBox" textAlign="center"/>
<mx:DataGridColumn dataField="Defect Description" itemRenderer="mx.controls.TextInput" textAlign="center" />
<mx:DataGridColumn dataField="Severity" itemRenderer="mx.controls.ComboBox" textAlign="center" />
<mx:DataGridColumn dataField="Type" itemRenderer="mx.controls.ComboBox" textAlign="center"/>
<mx:DataGridColumn dataField="Priority" itemRenderer="mx.controls.ComboBox" textAlign="center"/>
<mx:DataGridColumn dataField="Resolution/Verification remark" itemRenderer="mx.controls.TextInput" textAlign="center" headerWordWrap="true"/>
</mx:columns>
</mx:DataGrid>
<mx:FormItem label="Project Documents:">
<mx:HBox>
<mx:TextArea id="projDocs" width="150"/>
<mx:Button width="30" label="Project list" click="projDocsPopUp();"/>
</mx:HBox>
</mx:FormItem>
</mx:Panel>
When I click the button Project List, A pop up window opens and displays all the projects available in a datagrid. When I select the checkboxes in the datagrid, those particular projects name,i.e item name should be sent to the main mxml file and displayed in the text area(with id, "projDocs") how to do this? I have no idea. Some one help me.
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="handleCreationComplete();"
width="800" height="600">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import mx.collections.ArrayCollection;
private function handleCreationComplete():void {
PopUpManager.centerPopUp(this);
}
public var pages:ArrayCollection=new ArrayCollection(
[{label:"10"},
{label:"20"},
]);
public var projectList:ArrayCollection=new ArrayCollection([
{ItemName:"User Requirement Specification",ItemCodeVersion:"URS - 1"},
{ItemName:"User Requirement Specification",ItemCodeVersion:"URS - 2"},
{ItemName:"User Manual",ItemCodeVersion:"User Manual - 1"},
{ItemName:"Software Requirement Specification",ItemCodeVersion:"SRS - 2.1"},
{ItemName:"Software Requirement Specification",ItemCodeVersion:"SRS - 2.1"},
]);
private function close():void
{
PopUpManager.removePopUp(this);
}
private function select():void
{
//to select the item name and display it in the text area of the main file
}
]]>
</mx:Script>
<mx:Label styleName="labelHeading" text="Project Documents List"/>
<mx:Panel width="100%" height="100%" layout="vertical" title="Documents List" >
<mx:HBox>
<mx:Label text="Show"/>
<mx:ComboBox dataProvider="{pages}" width="60" />
<mx:Label text="results per page" />
</mx:HBox>
<mx:DataGrid id="projectListDG" dataProvider="{projectList}" rowCount="10" width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Select" itemRenderer="mx.controls.CheckBox" textAlign="center" width="50"/>
<mx:DataGridColumn headerText="Item Name" dataField="ItemName" textAlign="center" />
<mx:DataGridColumn headerText="Item Code - Version" dataField="ItemCodeVersion" textAlign="center" width="150 " />
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:HBox horizontalAlign="center" width="100%">
<mx:Button label="Select" click="select();"/>
<mx:Button label="Cancel" click="close();"/>
</mx:HBox>
</mx:TitleWindow>
| datagrid | flex3 | null | null | null | null | open | how to pass datagrid row values from one mxml component to another in Flex?
===
I have an mxml component with an empty datagrid. I also have a button,which on clicking, opens a pop up window.
This is the code for that:
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" >
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.core.IFlexDisplayObject;
import mx.managers.PopUpManager;
import mx.containers.TitleWindow;
//Datagrid
[Bindable]
private var defectDetails:ArrayCollection = new ArrayCollection([
{Select:true},
]);
private function projDocsPopUp():void{
var helpWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, projDocsLookUp, true));
helpWindow.title="Project Documents List";
}
]]>
</mx:Script>
<mx:Panel width="100%" height="50%" layout="vertical" title="Defect Details" >
<mx:DataGrid id="defectDG" dataProvider="{defectDetails}" variableRowHeight="true" width="100%" height="75" >
<mx:columns>
<mx:DataGridColumn dataField="Select" itemRenderer="mx.controls.CheckBox" width="50" textAlign="center" />
<mx:DataGridColumn dataField="Defect Id" itemRenderer="mx.controls.TextInput" textAlign="center"/>
<mx:DataGridColumn dataField="Status" itemRenderer="mx.controls.ComboBox" textAlign="center"/>
<mx:DataGridColumn dataField="Defect Description" itemRenderer="mx.controls.TextInput" textAlign="center" />
<mx:DataGridColumn dataField="Severity" itemRenderer="mx.controls.ComboBox" textAlign="center" />
<mx:DataGridColumn dataField="Type" itemRenderer="mx.controls.ComboBox" textAlign="center"/>
<mx:DataGridColumn dataField="Priority" itemRenderer="mx.controls.ComboBox" textAlign="center"/>
<mx:DataGridColumn dataField="Resolution/Verification remark" itemRenderer="mx.controls.TextInput" textAlign="center" headerWordWrap="true"/>
</mx:columns>
</mx:DataGrid>
<mx:FormItem label="Project Documents:">
<mx:HBox>
<mx:TextArea id="projDocs" width="150"/>
<mx:Button width="30" label="Project list" click="projDocsPopUp();"/>
</mx:HBox>
</mx:FormItem>
</mx:Panel>
When I click the button Project List, A pop up window opens and displays all the projects available in a datagrid. When I select the checkboxes in the datagrid, those particular projects name,i.e item name should be sent to the main mxml file and displayed in the text area(with id, "projDocs") how to do this? I have no idea. Some one help me.
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="handleCreationComplete();"
width="800" height="600">
<mx:Script>
<![CDATA[
import mx.managers.PopUpManager;
import mx.collections.ArrayCollection;
private function handleCreationComplete():void {
PopUpManager.centerPopUp(this);
}
public var pages:ArrayCollection=new ArrayCollection(
[{label:"10"},
{label:"20"},
]);
public var projectList:ArrayCollection=new ArrayCollection([
{ItemName:"User Requirement Specification",ItemCodeVersion:"URS - 1"},
{ItemName:"User Requirement Specification",ItemCodeVersion:"URS - 2"},
{ItemName:"User Manual",ItemCodeVersion:"User Manual - 1"},
{ItemName:"Software Requirement Specification",ItemCodeVersion:"SRS - 2.1"},
{ItemName:"Software Requirement Specification",ItemCodeVersion:"SRS - 2.1"},
]);
private function close():void
{
PopUpManager.removePopUp(this);
}
private function select():void
{
//to select the item name and display it in the text area of the main file
}
]]>
</mx:Script>
<mx:Label styleName="labelHeading" text="Project Documents List"/>
<mx:Panel width="100%" height="100%" layout="vertical" title="Documents List" >
<mx:HBox>
<mx:Label text="Show"/>
<mx:ComboBox dataProvider="{pages}" width="60" />
<mx:Label text="results per page" />
</mx:HBox>
<mx:DataGrid id="projectListDG" dataProvider="{projectList}" rowCount="10" width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Select" itemRenderer="mx.controls.CheckBox" textAlign="center" width="50"/>
<mx:DataGridColumn headerText="Item Name" dataField="ItemName" textAlign="center" />
<mx:DataGridColumn headerText="Item Code - Version" dataField="ItemCodeVersion" textAlign="center" width="150 " />
</mx:columns>
</mx:DataGrid>
</mx:Panel>
<mx:HBox horizontalAlign="center" width="100%">
<mx:Button label="Select" click="select();"/>
<mx:Button label="Cancel" click="close();"/>
</mx:HBox>
</mx:TitleWindow>
| 0 |
3,700,332 | 09/13/2010 12:24:51 | 326,821 | 04/27/2010 11:43:16 | 362 | 3 | network diagram/ flow diagram in JQuery | Have You got any examples or links to free JQuery flow diagram or network/ graph diagram ? | jquery | workflow | graph | null | null | 05/22/2012 23:14:46 | not constructive | network diagram/ flow diagram in JQuery
===
Have You got any examples or links to free JQuery flow diagram or network/ graph diagram ? | 4 |
6,797,776 | 07/23/2011 02:01:40 | 719,566 | 04/21/2011 19:34:36 | 1 | 0 | Jquery - find links that have no target or a certain target | I'd like to find all the links on a page that either have no target attribute or a target attribute that equals 'pageContent' and for all matched elements I would like to apply an onclick event to them.
The onlclick event is called pgTrans('start'). I'm not sure if it matters but some of the links may already have this event hard coded or attached via jQuery.
Thanks in advance! | jquery-selectors | null | null | null | null | null | open | Jquery - find links that have no target or a certain target
===
I'd like to find all the links on a page that either have no target attribute or a target attribute that equals 'pageContent' and for all matched elements I would like to apply an onclick event to them.
The onlclick event is called pgTrans('start'). I'm not sure if it matters but some of the links may already have this event hard coded or attached via jQuery.
Thanks in advance! | 0 |
5,593,910 | 04/08/2011 10:39:36 | 616,398 | 02/14/2011 15:05:22 | 167 | 19 | How to calculate annuity (in PHP)? | I'm not even sure if I'm using the right term, however I've got the following:
I've borrowed 25.000, which I'm going to pay back in 2 years (24 months). Per month I should pay 0.491% of interest and per year I should pay 5.9% interest.
What I want to know is, how much money do I need to pay each month. I already know the answer for this specific question, which should be 1106.80 leaving me in the end with 0.02 'something'. Probably that I pay 2 cents too much in the last month.
How do I go about this? | php | math | finance | null | null | 04/10/2011 09:51:01 | off topic | How to calculate annuity (in PHP)?
===
I'm not even sure if I'm using the right term, however I've got the following:
I've borrowed 25.000, which I'm going to pay back in 2 years (24 months). Per month I should pay 0.491% of interest and per year I should pay 5.9% interest.
What I want to know is, how much money do I need to pay each month. I already know the answer for this specific question, which should be 1106.80 leaving me in the end with 0.02 'something'. Probably that I pay 2 cents too much in the last month.
How do I go about this? | 2 |
3,915,443 | 10/12/2010 13:54:13 | 473,404 | 10/12/2010 13:40:41 | 1 | 0 | C# opengl texture | I want to use textures in opengl on my C# application.
I'm using the Tao Framework and I used this code
[http://www.gamedev.net/community/for...opic_id=405453][1] (post #2)
But I got this runtime error:
An unhandled exception of type 'System.DllNotFoundException' occurred in WindowsFormsApplication1.exe
Additional information: Unable to load DLL 'DevIL.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Could someone help me?
Is there any other way to do this?
[1]: http://www.gamedev.net/community/for...opic_id=405453 | c# | opengl | texture | null | null | null | open | C# opengl texture
===
I want to use textures in opengl on my C# application.
I'm using the Tao Framework and I used this code
[http://www.gamedev.net/community/for...opic_id=405453][1] (post #2)
But I got this runtime error:
An unhandled exception of type 'System.DllNotFoundException' occurred in WindowsFormsApplication1.exe
Additional information: Unable to load DLL 'DevIL.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Could someone help me?
Is there any other way to do this?
[1]: http://www.gamedev.net/community/for...opic_id=405453 | 0 |
9,313,098 | 02/16/2012 14:33:22 | 1,210,446 | 02/15/2012 03:45:40 | 11 | 0 | Pushfd and Pushad: What's the point? | I know that pushad pushes all the 32 bit registers onto the stack, but the only register that ends up being stored on the stack is EDI. Flag values aren't affected so what's the point of using pushad? Additionally, I know that pushfd pushes all flag values in a double format. So, if flag values are usually only 0 or 1 how does the pushfd operation push a value such as 00000A46 to the stack? | assembly | x86 | 32bit-64bit | basic | null | 04/21/2012 14:31:12 | too localized | Pushfd and Pushad: What's the point?
===
I know that pushad pushes all the 32 bit registers onto the stack, but the only register that ends up being stored on the stack is EDI. Flag values aren't affected so what's the point of using pushad? Additionally, I know that pushfd pushes all flag values in a double format. So, if flag values are usually only 0 or 1 how does the pushfd operation push a value such as 00000A46 to the stack? | 3 |
8,091,214 | 11/11/2011 08:04:51 | 308,097 | 04/03/2010 02:23:31 | 4,018 | 154 | How to make C# code using ADO.NET, IDbConnection and IDbCommand less verbose? | Is there anyway I can make this database code any shorter ? It works fine, but seems very verbose and repetitive. Wrapping some of it in a method would be better I suppose, but is there other improvement that could be made to shorten it ?
using (IDbConnection theConn = GetDatabaseConnection())
using (IDbCommand theCmd = theConn.CreateCommand())
{
theCmd.CommandText = @"INSERT INTO table(one, two, three,four)
VALUES (@one,@two,@three,@four)";
var parameterOne = theCmd.CreateParameter();
parameterOne.ParameterName = "@one";
parameterOne.Value = "text";
theCmd.Parameters.Add(parameterOne);
var parameterTwo = theCmd.CreateParameter();
parameterTwo.ParameterName = "@two";
parameterTwo.Value = "text";
theCmd.Parameters.Add(parameterTwo);
var parameterThree = theCmd.CreateParameter();
parameterThree.ParameterName = "@three";
parameterThree.Value = "text";
theCmd.Parameters.Add(parameterThree);
var parameterFour = theCmd.CreateParameter();
parameterFour.ParameterName = "@four";
parameterFour.Value = "text";
theCmd.Parameters.Add(parameterFour);
theCmd.ExecuteNonQuery();
} | c# | database | ado.net | parameters | verbosity | null | open | How to make C# code using ADO.NET, IDbConnection and IDbCommand less verbose?
===
Is there anyway I can make this database code any shorter ? It works fine, but seems very verbose and repetitive. Wrapping some of it in a method would be better I suppose, but is there other improvement that could be made to shorten it ?
using (IDbConnection theConn = GetDatabaseConnection())
using (IDbCommand theCmd = theConn.CreateCommand())
{
theCmd.CommandText = @"INSERT INTO table(one, two, three,four)
VALUES (@one,@two,@three,@four)";
var parameterOne = theCmd.CreateParameter();
parameterOne.ParameterName = "@one";
parameterOne.Value = "text";
theCmd.Parameters.Add(parameterOne);
var parameterTwo = theCmd.CreateParameter();
parameterTwo.ParameterName = "@two";
parameterTwo.Value = "text";
theCmd.Parameters.Add(parameterTwo);
var parameterThree = theCmd.CreateParameter();
parameterThree.ParameterName = "@three";
parameterThree.Value = "text";
theCmd.Parameters.Add(parameterThree);
var parameterFour = theCmd.CreateParameter();
parameterFour.ParameterName = "@four";
parameterFour.Value = "text";
theCmd.Parameters.Add(parameterFour);
theCmd.ExecuteNonQuery();
} | 0 |
11,242,928 | 06/28/2012 10:44:12 | 1,487,765 | 06/28/2012 07:21:54 | 3 | 0 | SIGSEGV for some test cases | #include<stdio.h>
#include<stdlib.h>
int **m,i,j;
void allocate(int r,int c)
{
m=(int **)(malloc(r*sizeof(int*)));
for(i=0;i<r;i++)
m[i]=(int *)(malloc(c*sizeof(int)));
}
void deallocate(int r)
{
for(i=0;i<r;i++)
free(m[i]);
}
int check(int a,int r,int c,int e)
{
for(i=0;i<c;i++)
{
if(m[a][i]==e)
return 1;
}
for(i=0;i<c;i++)
{
for(j=0;j<r;j++)
{
if(a!=j)
{
if(m[a][i]==m[j][i]&&m[a][i]!=-1)
{
m[a][i]=-1;
return check(j,r,c,e);
}
}
}
}
return 0;
}
int main()
{
int t,r,c;
scanf("%d",&t);
for(t;t>0;t--)
{
int n,e,a,b,x,y;
scanf("%d%d%d%d",&n,&e,&a,&b);
if(n>=1&&n<50000000&&e>0&&e<100)
{
allocate(e+1,n+1);
for(i=0;i<e;i++)
{
for(j=0;j<n;j++)
{
m[i][j]=-1;
}
}
for(i=0;i<e;i++)
{
scanf("%d%d",&x,&y);
for(j=0;j<((n-y)/x)+1;j++)
{
m[i][y+(j*x)]=y+(j*x);
}
}
int v,g=0;
for(i=0;i<e;i++)
{
for(j=0;j<n;j++)
{
if(m[i][j]==a)
{
v=check(i,e,n,b);
g++;
break;
}
}
}
if(v==1)
{
printf("It is possible to move the furniture.\n");
}
else if(v==0||g==0)
printf("The furniture cannot be moved.\n");
deallocate(r);
}
}
return 0;
}
>look at this link.. "http://www.spoj.pl/problems/SCRAPER/" and my code is >it gives correct answers for many test cases when i run it on ideone.com
>but when i submit the code,i get the SIGSEGV error.I dont wrong with the code.. some one help me please..
| c | null | null | null | null | 06/28/2012 11:56:39 | too localized | SIGSEGV for some test cases
===
#include<stdio.h>
#include<stdlib.h>
int **m,i,j;
void allocate(int r,int c)
{
m=(int **)(malloc(r*sizeof(int*)));
for(i=0;i<r;i++)
m[i]=(int *)(malloc(c*sizeof(int)));
}
void deallocate(int r)
{
for(i=0;i<r;i++)
free(m[i]);
}
int check(int a,int r,int c,int e)
{
for(i=0;i<c;i++)
{
if(m[a][i]==e)
return 1;
}
for(i=0;i<c;i++)
{
for(j=0;j<r;j++)
{
if(a!=j)
{
if(m[a][i]==m[j][i]&&m[a][i]!=-1)
{
m[a][i]=-1;
return check(j,r,c,e);
}
}
}
}
return 0;
}
int main()
{
int t,r,c;
scanf("%d",&t);
for(t;t>0;t--)
{
int n,e,a,b,x,y;
scanf("%d%d%d%d",&n,&e,&a,&b);
if(n>=1&&n<50000000&&e>0&&e<100)
{
allocate(e+1,n+1);
for(i=0;i<e;i++)
{
for(j=0;j<n;j++)
{
m[i][j]=-1;
}
}
for(i=0;i<e;i++)
{
scanf("%d%d",&x,&y);
for(j=0;j<((n-y)/x)+1;j++)
{
m[i][y+(j*x)]=y+(j*x);
}
}
int v,g=0;
for(i=0;i<e;i++)
{
for(j=0;j<n;j++)
{
if(m[i][j]==a)
{
v=check(i,e,n,b);
g++;
break;
}
}
}
if(v==1)
{
printf("It is possible to move the furniture.\n");
}
else if(v==0||g==0)
printf("The furniture cannot be moved.\n");
deallocate(r);
}
}
return 0;
}
>look at this link.. "http://www.spoj.pl/problems/SCRAPER/" and my code is >it gives correct answers for many test cases when i run it on ideone.com
>but when i submit the code,i get the SIGSEGV error.I dont wrong with the code.. some one help me please..
| 3 |
3,411,677 | 08/05/2010 04:07:30 | 409,345 | 08/03/2010 06:29:14 | 16 | 0 | pushing and poping in stack | i need to know pushing and poping in stack using c program | c# | null | null | null | null | 08/05/2010 04:42:47 | not a real question | pushing and poping in stack
===
i need to know pushing and poping in stack using c program | 1 |
6,014,208 | 05/16/2011 07:19:03 | 741,155 | 05/06/2011 05:49:00 | 1 | 1 | Paypal Checkout issue | I sell digital products using Paypal website payment standard. Everything is ok except that paypal checkout does not proceed stating the following error:
"PayPal does not allow your country of residence to deliver to the country you wish to"
I want to disable any shipping related things and I m using osCommerce | paypal | oscommerce | paypal-sandbox | null | null | 11/21/2011 23:58:04 | off topic | Paypal Checkout issue
===
I sell digital products using Paypal website payment standard. Everything is ok except that paypal checkout does not proceed stating the following error:
"PayPal does not allow your country of residence to deliver to the country you wish to"
I want to disable any shipping related things and I m using osCommerce | 2 |
11,261,100 | 06/29/2012 11:39:32 | 202,241 | 11/04/2009 01:05:26 | 1,310 | 73 | ios get play count for items in the media library | I am currently trying to categorise a users music collection and the ability to get the users most played songs/artists would greatly improve the user experience in the app. Is it possible to get the play count? and how would I go about doing it | iphone | objective-c | ios | null | null | null | open | ios get play count for items in the media library
===
I am currently trying to categorise a users music collection and the ability to get the users most played songs/artists would greatly improve the user experience in the app. Is it possible to get the play count? and how would I go about doing it | 0 |
822,768 | 05/05/2009 00:27:07 | 22,459 | 09/25/2008 23:06:55 | 10,605 | 502 | What are the pitfalls of a Java noob? | I've gone through a few Java questions on SO. And I must say the content here is [pretty well written][1] and the Java guys on SO can really pump out the answers.
But what I always found was Java answers for Java people. Which is great on its own, but I'm a Java noob. So I don't really care for the workings of ["Joint union in type parameter variance"][2]. It's probably handy down the line but for now.. it's not.
So Java for a noob (coming from PHP and Python) what are the cheatcodes?
If you could link to an SO answer (which is probably out there but I couldn't find) or write up what are the things Java does differently than other languages? (on a basic level)
Some might call these the Java Gotchas (I couldn't find the official one though)
[1]: http://stackoverflow.com/questions/457822/what-are-the-things-java-got-right
[2]: http://stackoverflow.com/questions/15496/hidden-features-of-java/42686#42686 | java | null | null | null | null | 02/03/2012 16:35:29 | not constructive | What are the pitfalls of a Java noob?
===
I've gone through a few Java questions on SO. And I must say the content here is [pretty well written][1] and the Java guys on SO can really pump out the answers.
But what I always found was Java answers for Java people. Which is great on its own, but I'm a Java noob. So I don't really care for the workings of ["Joint union in type parameter variance"][2]. It's probably handy down the line but for now.. it's not.
So Java for a noob (coming from PHP and Python) what are the cheatcodes?
If you could link to an SO answer (which is probably out there but I couldn't find) or write up what are the things Java does differently than other languages? (on a basic level)
Some might call these the Java Gotchas (I couldn't find the official one though)
[1]: http://stackoverflow.com/questions/457822/what-are-the-things-java-got-right
[2]: http://stackoverflow.com/questions/15496/hidden-features-of-java/42686#42686 | 4 |
10,480,293 | 05/07/2012 10:12:41 | 1,371,765 | 05/03/2012 06:54:22 | 3 | 0 | Installing symfony on windows with XAMPP | I'm a LINux user and recently i moved to windows OS and there i want to start all my projects which i created on linux environment. So that i started install symfony on windows with XAMPP server..
Upgrade pear:
pear upgrade pear <br/>
Install phing:
pear install -a http://phing.info/pear/phing-current.tgz --alldeps <br/>
Install symfony:
pear channel-discover pear.symfony-project.com <br/>
pear install symfony/symfony<br/>
These are the steps i followed. and after all on commmand prompt when i type command for symfony project creation , it says " 'symfony' is not recognized as an internal or external command, operable program or batch file." can anyone help me!!! | symfony | xampp | pear | null | null | 05/12/2012 19:02:03 | not constructive | Installing symfony on windows with XAMPP
===
I'm a LINux user and recently i moved to windows OS and there i want to start all my projects which i created on linux environment. So that i started install symfony on windows with XAMPP server..
Upgrade pear:
pear upgrade pear <br/>
Install phing:
pear install -a http://phing.info/pear/phing-current.tgz --alldeps <br/>
Install symfony:
pear channel-discover pear.symfony-project.com <br/>
pear install symfony/symfony<br/>
These are the steps i followed. and after all on commmand prompt when i type command for symfony project creation , it says " 'symfony' is not recognized as an internal or external command, operable program or batch file." can anyone help me!!! | 4 |
11,689,132 | 07/27/2012 13:48:31 | 166,013 | 08/31/2009 13:23:22 | 820 | 57 | How do I reload an <img/>? | I have a WebBrowser control on an WPF page. The HTML page loaded into the WebBrowser control displays images for the WPF application. I have a JavaScript callback from the WPF page into the HTML page telling the page that the images have changed and to reload images. I can't seem to find any way to tell the browser that the underlying file in the <img/> tag has changed.
How do I reload the img?
I've tried just changing the src attribute and I've also tired things like this:
$("#img1").attr("src", "");
$("#img2").attr("src", "");
$("#img1").attr("src", image1);
$("#img2").attr("src", image2);
The first time the function is called the images are displayed. When the image is changed and the function is called again, I the original image remains.
| javascript | jquery | html | webbrowser-control | null | null | open | How do I reload an <img/>?
===
I have a WebBrowser control on an WPF page. The HTML page loaded into the WebBrowser control displays images for the WPF application. I have a JavaScript callback from the WPF page into the HTML page telling the page that the images have changed and to reload images. I can't seem to find any way to tell the browser that the underlying file in the <img/> tag has changed.
How do I reload the img?
I've tried just changing the src attribute and I've also tired things like this:
$("#img1").attr("src", "");
$("#img2").attr("src", "");
$("#img1").attr("src", image1);
$("#img2").attr("src", image2);
The first time the function is called the images are displayed. When the image is changed and the function is called again, I the original image remains.
| 0 |
11,056,976 | 06/15/2012 19:26:04 | 1,120,323 | 12/29/2011 02:17:29 | 22 | 1 | Deleting rows based on multiple values in another table | This statement is returning error 00920- invalid relational operator.
I am sure it is my syntax, but I am not seeing it. If anycode could look it over and point me to getting it right, I would appreciate it.
Thank you
DELETE FROM TABLE15 p
WHERE (p.item_id, p.product_id) IN
(SELECT S.item_id, S.product_id )
FROM TABLE14 S);
| oracle | oracle11g | null | null | null | null | open | Deleting rows based on multiple values in another table
===
This statement is returning error 00920- invalid relational operator.
I am sure it is my syntax, but I am not seeing it. If anycode could look it over and point me to getting it right, I would appreciate it.
Thank you
DELETE FROM TABLE15 p
WHERE (p.item_id, p.product_id) IN
(SELECT S.item_id, S.product_id )
FROM TABLE14 S);
| 0 |
2,552,620 | 03/31/2010 11:56:10 | 184,920 | 10/06/2009 11:32:06 | 25 | 3 | ajax search suggest escape encoding | if encoding using escape(data) in javascript, how to deconde it in server side?
I use ajax to post encoding data with escape javascript function, how can I decode it at the server side with classic asp | ajax | asp | search | suggest | escaping | null | open | ajax search suggest escape encoding
===
if encoding using escape(data) in javascript, how to deconde it in server side?
I use ajax to post encoding data with escape javascript function, how can I decode it at the server side with classic asp | 0 |
11,289,964 | 07/02/2012 08:15:48 | 1,196,765 | 02/08/2012 09:30:50 | 34 | 3 | Ubuntu 12.04 behind proxy | Trying to use ubuntu 12.04 behind a proxy with authentication (username/password).
During installation it tries to download something after copying files. (downloading file 1/47 ... 23/152 ...).
What are thoses files ?
Is it a problem if skipping that step ?
Is it possible to configure a proxy for the installation ?
After installation, how to configure properly the proxy settings ?
via /etc/apt/apt.conf (adding Acquire ...)
via /etc/apt/apt.conf.d/02proxy (idem with Acquire ...)
via console and many gsettings set org.gnome.system.proxy ...
via system settings/network/proxy server ? no username/password possibility ...
All applications are reading proxy settings at the same place ?
For example : update manager, package manager, apt-get ...
Thanks.
| linux | proxy | ubuntu-12.04 | null | null | 07/02/2012 12:31:36 | off topic | Ubuntu 12.04 behind proxy
===
Trying to use ubuntu 12.04 behind a proxy with authentication (username/password).
During installation it tries to download something after copying files. (downloading file 1/47 ... 23/152 ...).
What are thoses files ?
Is it a problem if skipping that step ?
Is it possible to configure a proxy for the installation ?
After installation, how to configure properly the proxy settings ?
via /etc/apt/apt.conf (adding Acquire ...)
via /etc/apt/apt.conf.d/02proxy (idem with Acquire ...)
via console and many gsettings set org.gnome.system.proxy ...
via system settings/network/proxy server ? no username/password possibility ...
All applications are reading proxy settings at the same place ?
For example : update manager, package manager, apt-get ...
Thanks.
| 2 |
3,934,052 | 10/14/2010 14:11:44 | 259,859 | 01/27/2010 07:36:30 | 8 | 3 | RIA services: How to navigate from frontend to backend service method ? | I've got a call to a RIA services method in my frontend.
Is it possible to navigate to the corresponding method in the service ?
Using "F12 goto definition" or something similiar ?
When I press F12, Visual Studio only navigates to the generated stub method in my frontend (*.Web.g.cs file) but that's not what I need.
Maybe it's possible to put (or generate) some annotations to the stub method to force the editor to navigate directly to the backend source code ?
| service | ria | cross-reference | null | null | null | open | RIA services: How to navigate from frontend to backend service method ?
===
I've got a call to a RIA services method in my frontend.
Is it possible to navigate to the corresponding method in the service ?
Using "F12 goto definition" or something similiar ?
When I press F12, Visual Studio only navigates to the generated stub method in my frontend (*.Web.g.cs file) but that's not what I need.
Maybe it's possible to put (or generate) some annotations to the stub method to force the editor to navigate directly to the backend source code ?
| 0 |
6,966,624 | 08/06/2011 11:54:52 | 878,528 | 08/04/2011 11:55:18 | 61 | 10 | How to create web project in eclipse? | I followed the instructions on the page http://code.google.com/appengine/docs/java/tools/eclipse.html but even after installing and restarting I do not see any google toolbar or the option(File menu > New > Web Application Project). Do I need to install any other packages also?
I am using Version: Helios Service Release 2
| eclipse | google-app-engine | null | null | null | 08/06/2011 18:46:46 | too localized | How to create web project in eclipse?
===
I followed the instructions on the page http://code.google.com/appengine/docs/java/tools/eclipse.html but even after installing and restarting I do not see any google toolbar or the option(File menu > New > Web Application Project). Do I need to install any other packages also?
I am using Version: Helios Service Release 2
| 3 |
8,001,184 | 11/03/2011 20:08:50 | 1,028,463 | 11/03/2011 20:01:52 | 1 | 0 | Alter Linux scheduler using kernel module | I have created a kernel module which scans the task list and when I find a process with certain properties I would like to stop the process being scheduled for a certain amount of time by the scheduler.
So far I have identified the processes and have a pointer to the task_struct of it, but have no idea how to proceed any further. I have looked over and over the schedulers source code but I just can't figure it out.
Thanks in advance! | linux | module | linux-kernel | kernel | scheduler | 11/04/2011 03:09:30 | too localized | Alter Linux scheduler using kernel module
===
I have created a kernel module which scans the task list and when I find a process with certain properties I would like to stop the process being scheduled for a certain amount of time by the scheduler.
So far I have identified the processes and have a pointer to the task_struct of it, but have no idea how to proceed any further. I have looked over and over the schedulers source code but I just can't figure it out.
Thanks in advance! | 3 |
1,514,112 | 10/03/2009 15:50:36 | 47,573 | 12/18/2008 22:22:16 | 464 | 18 | Security restrictions for a plug-in? | This question is more or less the same as [Restrict Certain Java Code in a Plug-In][1], however the accepted answer was simply to further search with Google, what I already did without having this question answered.
Effectively, I want special security constraints only for code I load via plug-ins.
When a plug-in is loaded and started, all it gets are special objects from my application with which they can interact. Plug-ins shall not be allowed to access the file system, open network connections, etc. They're only allowed to "talk" with the objects I gave them.
However my application loading/running those plug-ins should have no restrictions. In other words, the security should only be enforced to the plug-ins.
There's also a very insightful post on [The FogBugz Plugin Architecture][2], more specifically the part about **Plugin Security and AppDomains** which exactly is I'm trying to achieve in Java.
Unfortunately I'm not able to answer just the question without implementation whether this is possible and what would be necessary.
[1]: http://stackoverflow.com/questions/1184789/restrict-certain-java-code-in-a-plug-in
[2]: http://www.fogcreek.com/FogBugz/blog/post/The-FogBugz-Plugin-Architecture.aspx | java | plugins | security | null | null | null | open | Security restrictions for a plug-in?
===
This question is more or less the same as [Restrict Certain Java Code in a Plug-In][1], however the accepted answer was simply to further search with Google, what I already did without having this question answered.
Effectively, I want special security constraints only for code I load via plug-ins.
When a plug-in is loaded and started, all it gets are special objects from my application with which they can interact. Plug-ins shall not be allowed to access the file system, open network connections, etc. They're only allowed to "talk" with the objects I gave them.
However my application loading/running those plug-ins should have no restrictions. In other words, the security should only be enforced to the plug-ins.
There's also a very insightful post on [The FogBugz Plugin Architecture][2], more specifically the part about **Plugin Security and AppDomains** which exactly is I'm trying to achieve in Java.
Unfortunately I'm not able to answer just the question without implementation whether this is possible and what would be necessary.
[1]: http://stackoverflow.com/questions/1184789/restrict-certain-java-code-in-a-plug-in
[2]: http://www.fogcreek.com/FogBugz/blog/post/The-FogBugz-Plugin-Architecture.aspx | 0 |
7,812,511 | 10/18/2011 19:23:48 | 985,138 | 10/08/2011 07:38:10 | 3 | 1 | Vertically aligned anchor text? | you probably see this question a lot. However, I've been through threads and I can't seem to find a solution to my situation. It's probably something very minute that I'm missing, or perhaps I'm just barking up the wrong tree all together.
Basically what I'm trying to do is take an anchor with a {display:block;} with a set height and width and have its text be vertically and horizontally centered.
Right now this is my css
.logo
{
width:140px;
height:75px;
border-right:1px dotted black;
border-bottom:1px dotted black;
float:left;
text-align:center;
font-size:15px;
font-weight:bold;
color:#c60606;
}
.logo a
{
display:block;
width:140px;
height:75px;
background-color:#fff;
font-size:15px;
font-weight:bold;
color:#c60606;
}
/*the reason for the double declaration of text information is because
some of the logo divs do not have anchors in them, and it's for uniformity
purposes.
*/
.logo a div
{
margin-top:10px;
}
and then the html would be
<div class="logo"><a href="#"><div>my link</div></a></div>
Now the reason i stuck a div inside of the anchor is because I thought it would be a good way to separate the text from the actual block, but with that margin setting it moves the anchor down instead of just the text. The vertical-align attribute does basically nothing, and I'm at a loss in terms of what to do. Any suggestions or restructuring ideas would be great. Thank you.
a sample can be found at http://www.dsi-usa.com/test/clientele.php feel free to browse the site it's still a work in progress a lot has to be organized and re-coded. Anyhow, that sample is exactly what I want, just need the text to be vertically aligned as well. | css | vertical-alignment | null | null | null | null | open | Vertically aligned anchor text?
===
you probably see this question a lot. However, I've been through threads and I can't seem to find a solution to my situation. It's probably something very minute that I'm missing, or perhaps I'm just barking up the wrong tree all together.
Basically what I'm trying to do is take an anchor with a {display:block;} with a set height and width and have its text be vertically and horizontally centered.
Right now this is my css
.logo
{
width:140px;
height:75px;
border-right:1px dotted black;
border-bottom:1px dotted black;
float:left;
text-align:center;
font-size:15px;
font-weight:bold;
color:#c60606;
}
.logo a
{
display:block;
width:140px;
height:75px;
background-color:#fff;
font-size:15px;
font-weight:bold;
color:#c60606;
}
/*the reason for the double declaration of text information is because
some of the logo divs do not have anchors in them, and it's for uniformity
purposes.
*/
.logo a div
{
margin-top:10px;
}
and then the html would be
<div class="logo"><a href="#"><div>my link</div></a></div>
Now the reason i stuck a div inside of the anchor is because I thought it would be a good way to separate the text from the actual block, but with that margin setting it moves the anchor down instead of just the text. The vertical-align attribute does basically nothing, and I'm at a loss in terms of what to do. Any suggestions or restructuring ideas would be great. Thank you.
a sample can be found at http://www.dsi-usa.com/test/clientele.php feel free to browse the site it's still a work in progress a lot has to be organized and re-coded. Anyhow, that sample is exactly what I want, just need the text to be vertically aligned as well. | 0 |
8,137,558 | 11/15/2011 14:06:37 | 603,483 | 02/04/2011 16:43:23 | 13 | 1 | How to get "real" mongo query when running fluent-mongo | When running my application I have to write to screen raw query used.
Is any method/extension method available, to get from this:
IQueryable alldata = hr.GetCollection"EventsReceiver").AsQueryable().Where(q => q.UserId == "123");
something similar to:
db.EventsReceiver.find({ "userid" : "123" });
Regards
Damir | c# | mongodb-csharp | fluent-mongo | null | null | null | open | How to get "real" mongo query when running fluent-mongo
===
When running my application I have to write to screen raw query used.
Is any method/extension method available, to get from this:
IQueryable alldata = hr.GetCollection"EventsReceiver").AsQueryable().Where(q => q.UserId == "123");
something similar to:
db.EventsReceiver.find({ "userid" : "123" });
Regards
Damir | 0 |
9,704,744 | 03/14/2012 15:17:35 | 1,265,403 | 03/13/2012 01:23:02 | 1 | 0 | Learning resources for C11? | I already know C (c89 and c99) and I would like to update my knowledge to the latest standard (C11). These times, seems to be difficult to find a good and updated book on the C programming language. I've searched all over the Internet but the informations are sparse, too technical to be useful or are just a reference to the standard paper.
So I'm wondering if there are good and updated tutorials (don't have to be necessarily free) on the new C11 features (I don't necessarily need a complete book that covers features I alredy know).
I'm particularly interested in the new threads support and the new _Generic selections / macros, but the most is covered, the better. In practice, I'm searching for a one stop solution for C11, if possible.
Thank you.
| c | c11 | null | null | null | 05/08/2012 00:59:40 | off topic | Learning resources for C11?
===
I already know C (c89 and c99) and I would like to update my knowledge to the latest standard (C11). These times, seems to be difficult to find a good and updated book on the C programming language. I've searched all over the Internet but the informations are sparse, too technical to be useful or are just a reference to the standard paper.
So I'm wondering if there are good and updated tutorials (don't have to be necessarily free) on the new C11 features (I don't necessarily need a complete book that covers features I alredy know).
I'm particularly interested in the new threads support and the new _Generic selections / macros, but the most is covered, the better. In practice, I'm searching for a one stop solution for C11, if possible.
Thank you.
| 2 |
8,530,158 | 12/16/2011 05:25:30 | 1,097,099 | 12/14/2011 04:56:49 | 6 | 1 | How to save the data in local database and retrive it? | Hi my web app looks like this
sign in username(textbox1) password(textbox2) submit(button)
signup
username(textbox1)
username(textbox3)
username(textbox4)
username(textbox5)
username(textbox6)
fileupload control(for image upload)
save(button)
what i want is if he is new user he should signup and save the data reuired....where the data should be saved in local database using sql when he clicks on save button,after that when user wants to see his page he shouls sign in with the gvn user name and when he clicks on submit button he should be directed to second page where the data he entered and the image he uploaded should be shown....i should do this using sql db can any 1 one help me out .......with ideas
| asp.net | c#-4.0 | null | null | null | 12/16/2011 09:03:44 | not a real question | How to save the data in local database and retrive it?
===
Hi my web app looks like this
sign in username(textbox1) password(textbox2) submit(button)
signup
username(textbox1)
username(textbox3)
username(textbox4)
username(textbox5)
username(textbox6)
fileupload control(for image upload)
save(button)
what i want is if he is new user he should signup and save the data reuired....where the data should be saved in local database using sql when he clicks on save button,after that when user wants to see his page he shouls sign in with the gvn user name and when he clicks on submit button he should be directed to second page where the data he entered and the image he uploaded should be shown....i should do this using sql db can any 1 one help me out .......with ideas
| 1 |
10,857,560 | 06/01/2012 21:26:14 | 1,431,629 | 06/01/2012 21:11:40 | 1 | 0 | Simple Modal and GMaps | I found myself with this issue - trying to get a map from GMaps API v2 to load inside a simple modal or jqmodal without breaking it. All the solutions I found online were to add an iframe, which works, but I needed the map to interact with my page, so the iframe wouldnt do it for me (since it's a remote file).
The solution is quite simple for any modal out there...when you initialize Gmaps, make sure you set the size too:
**map = new GMap2(document.getElementById('map'), { size: new GSize(800,400) });**
That should fix the issue where the map is partially shown with a gray background. | jquery | google-maps | modal | simplemodal | null | 06/04/2012 13:37:47 | not a real question | Simple Modal and GMaps
===
I found myself with this issue - trying to get a map from GMaps API v2 to load inside a simple modal or jqmodal without breaking it. All the solutions I found online were to add an iframe, which works, but I needed the map to interact with my page, so the iframe wouldnt do it for me (since it's a remote file).
The solution is quite simple for any modal out there...when you initialize Gmaps, make sure you set the size too:
**map = new GMap2(document.getElementById('map'), { size: new GSize(800,400) });**
That should fix the issue where the map is partially shown with a gray background. | 1 |
6,738,228 | 07/18/2011 19:24:22 | 398,309 | 07/21/2010 17:58:22 | 1,043 | 91 | How to convert DOM node text value to UTF-8 in JavaScript? | I need to send a text content of an HTML node over Ajax request, but first convert it to UTF-8. Is that possible?
Thanks! | javascript | character-encoding | null | null | null | null | open | How to convert DOM node text value to UTF-8 in JavaScript?
===
I need to send a text content of an HTML node over Ajax request, but first convert it to UTF-8. Is that possible?
Thanks! | 0 |
7,281,688 | 09/02/2011 09:42:44 | 859,154 | 07/23/2011 09:23:42 | 306 | 8 | How di raise event when new event has been written? | How do i raise my own event in c# when there has been "new audit event" operation to the computer Event Log ( in the manage section ...). | c# | visual-studio-2010 | null | null | null | 09/02/2011 10:30:01 | not a real question | How di raise event when new event has been written?
===
How do i raise my own event in c# when there has been "new audit event" operation to the computer Event Log ( in the manage section ...). | 1 |
3,049,339 | 06/15/2010 21:52:10 | 355,871 | 06/01/2010 21:20:18 | 50 | 0 | how can I represent 4 dimensional data in 3 dimensions(RGB) or 2 dimensions(XY grid) | I want to represent 4 dimensional data in RGB colors so that when clustering is done similar nodes have similar colors or by position on an XY grid. how can this be done? | dimensions | null | null | null | null | null | open | how can I represent 4 dimensional data in 3 dimensions(RGB) or 2 dimensions(XY grid)
===
I want to represent 4 dimensional data in RGB colors so that when clustering is done similar nodes have similar colors or by position on an XY grid. how can this be done? | 0 |
11,243,253 | 06/28/2012 11:04:24 | 1,488,315 | 06/28/2012 10:58:10 | 1 | 0 | Can't use Open Graph that Submit | I have some problem about facebook,please help me!:(
I can ues Open Graph already but when I wanna continue to submit my actions for approval,the message will get wrong.
I already try to reproduction these steps so many time,that still cans't solve the problem :(
please tell me how can I do the next steps?
pictures is my problem:
https://skitch.com/charles1021/eddc1/open-graph-facebook
thanks。
[1]: http://i.stack.imgur.com/xzWnx.jpg | facebook | facebook-graph-api | null | null | null | 06/28/2012 19:36:03 | not a real question | Can't use Open Graph that Submit
===
I have some problem about facebook,please help me!:(
I can ues Open Graph already but when I wanna continue to submit my actions for approval,the message will get wrong.
I already try to reproduction these steps so many time,that still cans't solve the problem :(
please tell me how can I do the next steps?
pictures is my problem:
https://skitch.com/charles1021/eddc1/open-graph-facebook
thanks。
[1]: http://i.stack.imgur.com/xzWnx.jpg | 1 |
8,496,108 | 12/13/2011 21:00:41 | 1,096,456 | 12/13/2011 19:09:13 | 6 | 0 | Save As from MS Word ends up in My Network Places instead of the SharePoint 2010 library (after navigating one level up from a documentset) | We have a SharePoint 2010 test Farm. This farm is accessed using HTTPS. The farm consists of 2 front end servers which are load balanced.
In the office we are working with MS Office 2003.
We have a library in our SharePoint solution in which first documentsets are created, and within these documentsets the documents are placed. One of the requirements that must be fullfilled is that a new documentset is created, after which an existing document is opened in MS Word and that it is saved in the new documentset (by using Save As).
Now we have the problem that if we do the Save As, we first get the existing documentset in the save window. If we navigate one level up, we end up in My Network Places (instead of the root of the library). If we first open the library (the root) in the explorer (the Open in Explorer button from SharePoint), the library is added to the My Network Places. After this when we navigate one level up, we end up in the root of the library (so that we can navigate to the newly created documentset). This last situation is the desired situation.
Does anybody know how we can 'push' the library to the My Network Places of the users (so that they don't have to use the Open in Explorer button, this solution will not be accepted in the User Acceptance Test)?
Is there another solution to the requirement that an existing document can be saved in a new documentset? The end solution has to be used by non-technical users, so it should not be too complicated.
Thanks!
Henk
| sharepoint2010 | ms-word | document-set | null | null | null | open | Save As from MS Word ends up in My Network Places instead of the SharePoint 2010 library (after navigating one level up from a documentset)
===
We have a SharePoint 2010 test Farm. This farm is accessed using HTTPS. The farm consists of 2 front end servers which are load balanced.
In the office we are working with MS Office 2003.
We have a library in our SharePoint solution in which first documentsets are created, and within these documentsets the documents are placed. One of the requirements that must be fullfilled is that a new documentset is created, after which an existing document is opened in MS Word and that it is saved in the new documentset (by using Save As).
Now we have the problem that if we do the Save As, we first get the existing documentset in the save window. If we navigate one level up, we end up in My Network Places (instead of the root of the library). If we first open the library (the root) in the explorer (the Open in Explorer button from SharePoint), the library is added to the My Network Places. After this when we navigate one level up, we end up in the root of the library (so that we can navigate to the newly created documentset). This last situation is the desired situation.
Does anybody know how we can 'push' the library to the My Network Places of the users (so that they don't have to use the Open in Explorer button, this solution will not be accepted in the User Acceptance Test)?
Is there another solution to the requirement that an existing document can be saved in a new documentset? The end solution has to be used by non-technical users, so it should not be too complicated.
Thanks!
Henk
| 0 |
9,350,726 | 02/19/2012 16:03:12 | 51,819 | 01/05/2009 21:44:50 | 939 | 34 | Raising a Backbone.js View event | I'd like to find a way to raise a backbone.js "event" without something having changed in the model or in the dom.
For instance, I'm loading the Facebook SDK asynchronously. I'm subscribed to the auth.login event, and would like to send a message to my view that the user has logged in so it can re-render itself appropriately.
My view looks similar to this:
window.CreateItemView = Backbone.View.extend({
el: $('#content'),
initialize: function() {
this.render();
},
render: function() {
// do something
return this;
},
setSignedRequest: function(signedRequest) {
//do something with signedRequest
}
});
In my facebook code, I do this:
FB.Event.subscribe('auth.login', function(response){
if (response.status === 'connected') {
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
window.signedRequest = response.authResponse.signedRequest;
if (window.view && window.view.setSignedRequest) {
window.view.setSignedRequest(window.signedRequest);
}
}
});
However, while window.view exists, it cannot see the setSignedRequest method. I've ensured that my scripts are loading in the correct order. Strangely I have this same code on a different page albeit a different View object and it works fine. I haven't seen any difference that would account for this.
A better solution would be to raise some sort of event and have the view listen for it. However, I don't want to utilize the change event on the model as the signedRequest shouldn't be a property of the model. Is there a better way of accomplishing this? | javascript | backbone.js | null | null | null | null | open | Raising a Backbone.js View event
===
I'd like to find a way to raise a backbone.js "event" without something having changed in the model or in the dom.
For instance, I'm loading the Facebook SDK asynchronously. I'm subscribed to the auth.login event, and would like to send a message to my view that the user has logged in so it can re-render itself appropriately.
My view looks similar to this:
window.CreateItemView = Backbone.View.extend({
el: $('#content'),
initialize: function() {
this.render();
},
render: function() {
// do something
return this;
},
setSignedRequest: function(signedRequest) {
//do something with signedRequest
}
});
In my facebook code, I do this:
FB.Event.subscribe('auth.login', function(response){
if (response.status === 'connected') {
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
window.signedRequest = response.authResponse.signedRequest;
if (window.view && window.view.setSignedRequest) {
window.view.setSignedRequest(window.signedRequest);
}
}
});
However, while window.view exists, it cannot see the setSignedRequest method. I've ensured that my scripts are loading in the correct order. Strangely I have this same code on a different page albeit a different View object and it works fine. I haven't seen any difference that would account for this.
A better solution would be to raise some sort of event and have the view listen for it. However, I don't want to utilize the change event on the model as the signedRequest shouldn't be a property of the model. Is there a better way of accomplishing this? | 0 |
7,226,411 | 08/29/2011 05:28:00 | 917,203 | 08/29/2011 05:28:00 | 1 | 0 | Memmove putting an element at front of array? | 0 0 1 2 3 4 1 2 3 4
1 0 1 2 2 3 4 2 3 4
when I do Memmove(4,3,3)
why does that 1 get put at the front? | c++ | null | null | null | null | 08/29/2011 06:54:23 | not a real question | Memmove putting an element at front of array?
===
0 0 1 2 3 4 1 2 3 4
1 0 1 2 2 3 4 2 3 4
when I do Memmove(4,3,3)
why does that 1 get put at the front? | 1 |
11,089,026 | 06/18/2012 18:42:21 | 1,232,530 | 02/25/2012 13:04:21 | 1 | 0 | Ideas for multi-tier (music score like) text editor in GTK/Python | For the purpose of transcribing spoken text, I’d like to write a text editor that supports multiple parallel tiers (think staves in a music score). My language and toolkit of choice is Python with PyGI/GTK.
The idea is that one can transcribe text with multiple speakers, and have one tier for each speaker. Overlapping speech can then be noted by having text in multiple tiers. The general idea is implemented in specialized software like EXMARaLDA: http://www.exmaralda.org/partitureditor.html
Having two tiers that expand horizontally and have to be scrolled accordingly is probably relatively simple. What I want to get is wrapping lines, like music staves have. In the result, one would have alternating lines:
Speaker 1: text text text text.
Speaker 2: text text text text
Speaker 1: text text text.
Speaker 2: text text.
Now what would be the easiest way to achieve something like that in GTK? I’d like to be able to use something like a Gtk.TextBuffer, so I can have things like tags for free. But I guess I’d have to write a custom text rendering widget from scratch? Or is it possible to tweak Gtk.TextView accordingly?
On the buffer side, I think I could just go with one paragraph for each tier. When rendered in a standard TextView, they would probably look like:
[S1] text text text text. text text text.
[S2] text text text text text text.
And wrapped like:
[S1] text text text text.
[S1] text text text.
[S2] text text text text
[S2] text text.
Now the difficult part is to weave the lines, so that one gets the desired alternating lines, as shown above. I guess I could just put the text into a Pango.Layout, and then render the lines using PangoCairo.show_layout_line into a Gtk.DrawingArea. But then I’d have to write all the editing functionality by myself. Or is there a simpler way that preserves the editing functionality of Gtk.TextView?
I’d be thankful for any hints! Maybe I just have the wrong approach, so don’t hesitate to show me a completely different way to what I have in mind.
Thanks,
Frederik | python | gtk | null | null | null | 07/15/2012 22:01:37 | not a real question | Ideas for multi-tier (music score like) text editor in GTK/Python
===
For the purpose of transcribing spoken text, I’d like to write a text editor that supports multiple parallel tiers (think staves in a music score). My language and toolkit of choice is Python with PyGI/GTK.
The idea is that one can transcribe text with multiple speakers, and have one tier for each speaker. Overlapping speech can then be noted by having text in multiple tiers. The general idea is implemented in specialized software like EXMARaLDA: http://www.exmaralda.org/partitureditor.html
Having two tiers that expand horizontally and have to be scrolled accordingly is probably relatively simple. What I want to get is wrapping lines, like music staves have. In the result, one would have alternating lines:
Speaker 1: text text text text.
Speaker 2: text text text text
Speaker 1: text text text.
Speaker 2: text text.
Now what would be the easiest way to achieve something like that in GTK? I’d like to be able to use something like a Gtk.TextBuffer, so I can have things like tags for free. But I guess I’d have to write a custom text rendering widget from scratch? Or is it possible to tweak Gtk.TextView accordingly?
On the buffer side, I think I could just go with one paragraph for each tier. When rendered in a standard TextView, they would probably look like:
[S1] text text text text. text text text.
[S2] text text text text text text.
And wrapped like:
[S1] text text text text.
[S1] text text text.
[S2] text text text text
[S2] text text.
Now the difficult part is to weave the lines, so that one gets the desired alternating lines, as shown above. I guess I could just put the text into a Pango.Layout, and then render the lines using PangoCairo.show_layout_line into a Gtk.DrawingArea. But then I’d have to write all the editing functionality by myself. Or is there a simpler way that preserves the editing functionality of Gtk.TextView?
I’d be thankful for any hints! Maybe I just have the wrong approach, so don’t hesitate to show me a completely different way to what I have in mind.
Thanks,
Frederik | 1 |
8,587,699 | 12/21/2011 09:37:05 | 1,109,500 | 12/21/2011 09:11:05 | 1 | 0 | Why are android widgets weird like this? | #I am working on a weather widget and its output is:#
###[Image link here][1]###
#Why are "°F" and "Wind" repeated? Is there a solutuion to this?#
The code is pretty straightforward. Calling loadWeatherData() calls the setTextViewText on views. Later the view is sent to the AppWidgetManager.
.
.
.
private void loadWeatherData(RemoteViews view, String zip)
{
UrlReader u = new UrlReader(zip);
view.setTextViewText(R.id.tvLoc, u.getLocation());
view.setTextViewText(R.id.tvCurrTemp,
"Current Temp: " + u.getCurrTempF() + "°F");
view.setTextViewText(R.id.tvCurrCond, "Condition: "+u.getCurrCond());
view.setTextViewText(R.id.tvHighLow, "Low/High: "+u.getLowf()+"/"+u.getHighf());
view.setTextViewText(R.id.tvOthers, "Wind: "+u.getWind());
String format="kk:mm aa";
SimpleDateFormat sdf = new SimpleDateFormat(format);
view.setTextViewText(R.id.tvUpdateTime, sdf.format(new Date().getTime()));
}
.
.
.
.
[1]: http://i.stack.imgur.com/LybqN.jpg | android | appwidget | null | null | null | 12/21/2011 16:06:22 | too localized | Why are android widgets weird like this?
===
#I am working on a weather widget and its output is:#
###[Image link here][1]###
#Why are "°F" and "Wind" repeated? Is there a solutuion to this?#
The code is pretty straightforward. Calling loadWeatherData() calls the setTextViewText on views. Later the view is sent to the AppWidgetManager.
.
.
.
private void loadWeatherData(RemoteViews view, String zip)
{
UrlReader u = new UrlReader(zip);
view.setTextViewText(R.id.tvLoc, u.getLocation());
view.setTextViewText(R.id.tvCurrTemp,
"Current Temp: " + u.getCurrTempF() + "°F");
view.setTextViewText(R.id.tvCurrCond, "Condition: "+u.getCurrCond());
view.setTextViewText(R.id.tvHighLow, "Low/High: "+u.getLowf()+"/"+u.getHighf());
view.setTextViewText(R.id.tvOthers, "Wind: "+u.getWind());
String format="kk:mm aa";
SimpleDateFormat sdf = new SimpleDateFormat(format);
view.setTextViewText(R.id.tvUpdateTime, sdf.format(new Date().getTime()));
}
.
.
.
.
[1]: http://i.stack.imgur.com/LybqN.jpg | 3 |
3,182,842 | 07/06/2010 00:28:30 | 384,074 | 07/06/2010 00:28:30 | 1 | 0 | Index was outside the bounds of the array (VB.NET) | I am getting "Index was outside the bounds of the array." error when using this code:
Dim RandomA As String = "aAÀàÁâÄäÅåĀāĂ㥹ǞǟǺǻÃãÄ"
TextBox1.Text = TextBox1.Text.Replace("a", RandomA((Int(Rnd() * RandomA.Count)) - 1))
I fail to see how the (random) index can be out of bounds? | vb.net | arrays | index | out | bounds | null | open | Index was outside the bounds of the array (VB.NET)
===
I am getting "Index was outside the bounds of the array." error when using this code:
Dim RandomA As String = "aAÀàÁâÄäÅåĀāĂ㥹ǞǟǺǻÃãÄ"
TextBox1.Text = TextBox1.Text.Replace("a", RandomA((Int(Rnd() * RandomA.Count)) - 1))
I fail to see how the (random) index can be out of bounds? | 0 |
6,871,860 | 07/29/2011 10:36:44 | 746,383 | 05/10/2011 07:49:53 | 39 | 2 | Neo4j export Tree | I want to export a Tree which has a distinct root node. I tried it with gremlin (g.saveGraphML("export.graphml")) but this is exporting the whole database. Then I tried it with g.v(783095).saveGraphML("export.graphml") which gave me an error (No signature of method: java.util.HashMap.saveGraphML() is applicable for argument types: (java.lang.String) values: [export.graphml])
Any Ideas? | neo4j | null | null | null | null | null | open | Neo4j export Tree
===
I want to export a Tree which has a distinct root node. I tried it with gremlin (g.saveGraphML("export.graphml")) but this is exporting the whole database. Then I tried it with g.v(783095).saveGraphML("export.graphml") which gave me an error (No signature of method: java.util.HashMap.saveGraphML() is applicable for argument types: (java.lang.String) values: [export.graphml])
Any Ideas? | 0 |
10,230,549 | 04/19/2012 14:41:17 | 264,052 | 02/02/2010 04:03:26 | 2,277 | 15 | Why there must be a delegate to bridge a Thread and its Method? | The following code is common:
Work w = new Work();
w.Data = 42;
threadDelegate = new ThreadStart(w.DoMoreWork);
newThread = new Thread(threadDelegate);
newThread.Start();
I just wonder, why there must be a delegate to **bridge** the Thread and the Method to execute on that thread?
Could we just send the method name to the Thread directly? | .net | multithreading | delegates | null | null | null | open | Why there must be a delegate to bridge a Thread and its Method?
===
The following code is common:
Work w = new Work();
w.Data = 42;
threadDelegate = new ThreadStart(w.DoMoreWork);
newThread = new Thread(threadDelegate);
newThread.Start();
I just wonder, why there must be a delegate to **bridge** the Thread and the Method to execute on that thread?
Could we just send the method name to the Thread directly? | 0 |
2,642,688 | 04/15/2010 04:16:04 | 116,512 | 06/03/2009 06:26:51 | 196 | 0 | cfml error with appication.cfc page | I have some problem with my cfml website.
I have used the below code in application.cfc file to connect with the dsn.
But when ever i put this in my server, i'm getting error. i cant browse even a single test.cfm page.
Is there any mistake in that code , any syntax error or something like that, will it be some problem with the dsn
<cfcomponent displayname="Application" hint="The Application.cfc" output="yes">
<cfset this.name = "0307de6.netsolhost.com">
<cfset this.sessionmanagement = true>
<cfset this.loginstorage="session">
<cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0)>
<cfset this.applicationtimeout = CreateTimeSpan(2,0,0,0)>
<cffunction name="onApplicationStart">
<cfscript>
application.DSN = "hirerodsn";
application.dbUserName = "myusr";
application.dbPassword = "myd69!";
</cfscript>
</cffunction>
<cffunction name="onRequestStart">
<cfscript>
request.DSN = "hirerodsn";
request.dbUserName = "myusr";
request.dbPassword = "myd69!";
</cfscript>
</cffunction>
</cfcomponent>
please anyone help me | coldfusion | null | null | null | null | null | open | cfml error with appication.cfc page
===
I have some problem with my cfml website.
I have used the below code in application.cfc file to connect with the dsn.
But when ever i put this in my server, i'm getting error. i cant browse even a single test.cfm page.
Is there any mistake in that code , any syntax error or something like that, will it be some problem with the dsn
<cfcomponent displayname="Application" hint="The Application.cfc" output="yes">
<cfset this.name = "0307de6.netsolhost.com">
<cfset this.sessionmanagement = true>
<cfset this.loginstorage="session">
<cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0)>
<cfset this.applicationtimeout = CreateTimeSpan(2,0,0,0)>
<cffunction name="onApplicationStart">
<cfscript>
application.DSN = "hirerodsn";
application.dbUserName = "myusr";
application.dbPassword = "myd69!";
</cfscript>
</cffunction>
<cffunction name="onRequestStart">
<cfscript>
request.DSN = "hirerodsn";
request.dbUserName = "myusr";
request.dbPassword = "myd69!";
</cfscript>
</cffunction>
</cfcomponent>
please anyone help me | 0 |
1,105,423 | 07/09/2009 17:39:23 | 58,808 | 01/25/2009 16:26:51 | 5,448 | 205 | PHP quirks and pitfalls | I've realized that, although most of my experience consists in writing PHP applications, I find myself making "beginner mistakes" from time to time. This because PHP is a language that has grown very organically and as such has some idiosyncrasies, quirks and pitfalls that I don't know about.
I'd like this question to be a wiki for all those who want to know PHP's pitfalls and exceptions from what we might believe are the rules. But please, don't write general responses like:
> Some functions receive arguments as
> `$needle`, `$haystack`, while some as
> `$haystack`, `$needle`.
Tell the function names. You have a few answers from me as examples. Oh, and add one pitfall per answer. This way we'll see which is the most despised of them all (by voting).
I don't want to start a flame war, keep it to the subject. If you'd like to write some bad things about PHP then do it as a comment to the respective answer.
Hopefully this wiki will be of help for all of us, beginners and experts. | php | pitfalls | null | null | null | 04/06/2012 17:59:54 | not constructive | PHP quirks and pitfalls
===
I've realized that, although most of my experience consists in writing PHP applications, I find myself making "beginner mistakes" from time to time. This because PHP is a language that has grown very organically and as such has some idiosyncrasies, quirks and pitfalls that I don't know about.
I'd like this question to be a wiki for all those who want to know PHP's pitfalls and exceptions from what we might believe are the rules. But please, don't write general responses like:
> Some functions receive arguments as
> `$needle`, `$haystack`, while some as
> `$haystack`, `$needle`.
Tell the function names. You have a few answers from me as examples. Oh, and add one pitfall per answer. This way we'll see which is the most despised of them all (by voting).
I don't want to start a flame war, keep it to the subject. If you'd like to write some bad things about PHP then do it as a comment to the respective answer.
Hopefully this wiki will be of help for all of us, beginners and experts. | 4 |
6,329,352 | 06/13/2011 10:39:58 | 795,773 | 06/13/2011 10:39:58 | 1 | 0 | How to create embossed borders in HTML, CSS? | Some GUIs use boxes (with embossed borders) to group widgets. I would like to create this look with HTML and CSS. | html | css | emboss | null | null | 06/13/2011 11:00:02 | not a real question | How to create embossed borders in HTML, CSS?
===
Some GUIs use boxes (with embossed borders) to group widgets. I would like to create this look with HTML and CSS. | 1 |
9,150,841 | 02/05/2012 16:27:23 | 1,117,146 | 12/27/2011 06:03:00 | 6 | 0 | Internet Explorer 7/8/9 : IFRAME invisible | I am trying to create an iframe for the following url.
http://www.pgsoftwaresolutions.in/index.html
<iframe src="http://www.pgsoftwaresolutions.in/index.html" width="255" height="210"></iframe>
I tried it on IE7 locally and IE 8/9 on browserstack.com
The page loads the timer works correctly when loaded directly in the IE browser, but when in an IFRAME it becomes invisible.
At first i thought that it might a jQuery issue or IE bug about IFRAME not triggering the document ready/load event.
Just to test what went wrong where in the javascript i added a javascript alert() in the javascript function which replaces the numbers on the timer on a copy of the above code in
http://www.pgsoftwaresolutions.in/debug/index.html
NOTE: To close this page after the first 7 alerts are fired. Quickly press ENTER and then CTRL + F4 to close the page.
I tested it on IE 7. It works and a series of alerts are fired at the start and then one every second.
Then i loaded the same page in an IFRAME and it DOES throw the alerts.
<iframe src="http://www.pgsoftwaresolutions.in/debug/index.html" width="255" height="210"></iframe>
I have no clue how to debug anything related to javscript or IFRAMEs on IE7 properly as Firebug lite does not support those so any help will be appreciated.
| jquery | css | internet-explorer | iframe | null | null | open | Internet Explorer 7/8/9 : IFRAME invisible
===
I am trying to create an iframe for the following url.
http://www.pgsoftwaresolutions.in/index.html
<iframe src="http://www.pgsoftwaresolutions.in/index.html" width="255" height="210"></iframe>
I tried it on IE7 locally and IE 8/9 on browserstack.com
The page loads the timer works correctly when loaded directly in the IE browser, but when in an IFRAME it becomes invisible.
At first i thought that it might a jQuery issue or IE bug about IFRAME not triggering the document ready/load event.
Just to test what went wrong where in the javascript i added a javascript alert() in the javascript function which replaces the numbers on the timer on a copy of the above code in
http://www.pgsoftwaresolutions.in/debug/index.html
NOTE: To close this page after the first 7 alerts are fired. Quickly press ENTER and then CTRL + F4 to close the page.
I tested it on IE 7. It works and a series of alerts are fired at the start and then one every second.
Then i loaded the same page in an IFRAME and it DOES throw the alerts.
<iframe src="http://www.pgsoftwaresolutions.in/debug/index.html" width="255" height="210"></iframe>
I have no clue how to debug anything related to javscript or IFRAMEs on IE7 properly as Firebug lite does not support those so any help will be appreciated.
| 0 |
9,103,318 | 02/01/2012 21:02:46 | 1,182,313 | 02/01/2012 09:18:41 | 8 | 0 | Can someone explain database operations in detail? | I am front-end UI guy and just starting to learn more about databases and backend stuff in general. Say we have a huge loop/dataset
in Ruby where @products is huge and product.bar sometimes has small amount of data, but sometime will have a large amount of data:
@products.each do | product |
@products.find(someid)
@products.foo = product.bar
@products.save
end
in PHP:
<?php
for ($i = 0; $i <= sizeof(largeDataSet); $i++) {
mysql_query("INSERT INTO Persons (FirstName, LastName, Age)
VALUES ("largeDataSet['foo']", ("largeDataSet['bar']", ("largeDataSet['baz']")");
}
?>
What if we have this case where there are some calculations done upon the data set (this is a bad example, but assume that multiplying by arrayofCalculations is very complex) :
<?php
for ($i = 0; $i <= sizeof(largeDataSet); $i++) {
for($j = 0; $j <= sizeof(arrayofCalculations); $j++){
mysql_query("INSERT INTO Persons (FirstName, LastName, Age)
largeDataSet['foo'] = largeDataSet['foo'] * arrayofCalculations[$j];
largeDataSet['foo'] = largeDataSet['bar'] * arrayofCalculations[$j];
largeDataSet['foo'] = largeDataSet['baz'] * arrayofCalculations[$j];
VALUES ("largeDataSet['foo']", ("largeDataSet['bar']", ("largeDataSet['baz']")");
}
}
?>
Whatever language, it doesn't matter, also whatever db ( psql, mysql, etc ).
1) My question is can someone explain to me in *detail* how databases handle requests for updating and inserting large amounts of data?
2) What happens if the data being inserted takes the db 5 seconds to insert? Does that mean all further requests are blocked?
3) How does the db handle this if multiple users are doing this complicated insert? (after google: locking?)
Basically not sure where to start... or even what to tag this post as... | php | mysql | database | postgresql | database-design | 02/01/2012 21:09:32 | off topic | Can someone explain database operations in detail?
===
I am front-end UI guy and just starting to learn more about databases and backend stuff in general. Say we have a huge loop/dataset
in Ruby where @products is huge and product.bar sometimes has small amount of data, but sometime will have a large amount of data:
@products.each do | product |
@products.find(someid)
@products.foo = product.bar
@products.save
end
in PHP:
<?php
for ($i = 0; $i <= sizeof(largeDataSet); $i++) {
mysql_query("INSERT INTO Persons (FirstName, LastName, Age)
VALUES ("largeDataSet['foo']", ("largeDataSet['bar']", ("largeDataSet['baz']")");
}
?>
What if we have this case where there are some calculations done upon the data set (this is a bad example, but assume that multiplying by arrayofCalculations is very complex) :
<?php
for ($i = 0; $i <= sizeof(largeDataSet); $i++) {
for($j = 0; $j <= sizeof(arrayofCalculations); $j++){
mysql_query("INSERT INTO Persons (FirstName, LastName, Age)
largeDataSet['foo'] = largeDataSet['foo'] * arrayofCalculations[$j];
largeDataSet['foo'] = largeDataSet['bar'] * arrayofCalculations[$j];
largeDataSet['foo'] = largeDataSet['baz'] * arrayofCalculations[$j];
VALUES ("largeDataSet['foo']", ("largeDataSet['bar']", ("largeDataSet['baz']")");
}
}
?>
Whatever language, it doesn't matter, also whatever db ( psql, mysql, etc ).
1) My question is can someone explain to me in *detail* how databases handle requests for updating and inserting large amounts of data?
2) What happens if the data being inserted takes the db 5 seconds to insert? Does that mean all further requests are blocked?
3) How does the db handle this if multiple users are doing this complicated insert? (after google: locking?)
Basically not sure where to start... or even what to tag this post as... | 2 |
6,842,769 | 07/27/2011 10:20:19 | 821,671 | 06/29/2011 18:00:00 | 1 | 0 | Layout Java help | Hi guys can anyone help?
I need to do a layout for my program in java to look something like this
http://i1184.photobucket.com/albums/z321/Rbn_Veiga/Picture111.jpg | java | layout | button | null | null | 07/27/2011 11:03:26 | too localized | Layout Java help
===
Hi guys can anyone help?
I need to do a layout for my program in java to look something like this
http://i1184.photobucket.com/albums/z321/Rbn_Veiga/Picture111.jpg | 3 |
3,634,533 | 09/03/2010 09:38:18 | 276,233 | 02/18/2010 15:57:19 | 70 | 1 | Factory Girl with has many relationship (and a protected attribute) | I have this kind of relation:
class Article < ActiveRecord::Base
has_many :comments
end
class Comment < ActiveRecord::Base
belongs_to :article
attr_protected :article_id
end
The default scenario inside controllers looks like:
@article = Article.create(:title => "foobar")
@comment = @article.comments.create(:content => "w00t")
I had tried to write those factories:
Factory.define :article do |f|
f.title "Hello, world"
end
Factory.define :comment do |f|
f.content "Awesome!"
f.association :article
end
But my syntax is not correct about the association. It's a little bit tricky because of the comment's article_id protected attribute. So I think this should be better if I declare the association inside the article factory, but I don't see how to process.
Thanks for any help. | ruby-on-rails | testing | ruby-on-rails-3 | shoulda | factorygirl | null | open | Factory Girl with has many relationship (and a protected attribute)
===
I have this kind of relation:
class Article < ActiveRecord::Base
has_many :comments
end
class Comment < ActiveRecord::Base
belongs_to :article
attr_protected :article_id
end
The default scenario inside controllers looks like:
@article = Article.create(:title => "foobar")
@comment = @article.comments.create(:content => "w00t")
I had tried to write those factories:
Factory.define :article do |f|
f.title "Hello, world"
end
Factory.define :comment do |f|
f.content "Awesome!"
f.association :article
end
But my syntax is not correct about the association. It's a little bit tricky because of the comment's article_id protected attribute. So I think this should be better if I declare the association inside the article factory, but I don't see how to process.
Thanks for any help. | 0 |
3,181,594 | 07/05/2010 18:50:45 | 242,076 | 01/01/2010 22:53:54 | 169 | 7 | how in .net i handle a click over a balloon tip, displayed through ShowBalloonTip of a TrayIcon | I use ShowBalloonTip method of a TrayIcon class to display a balloon tip. Is there a way to handle a click over this balloon? When i click over the balloon no event seem to be generated, and it only closes the balloon. | c# | .net | windows | vb.net | vb | null | open | how in .net i handle a click over a balloon tip, displayed through ShowBalloonTip of a TrayIcon
===
I use ShowBalloonTip method of a TrayIcon class to display a balloon tip. Is there a way to handle a click over this balloon? When i click over the balloon no event seem to be generated, and it only closes the balloon. | 0 |
5,709,396 | 04/18/2011 21:59:30 | 584,634 | 01/21/2011 15:29:12 | 538 | 50 | MySQL query to get all highest id's |
I have a sql result that returns something like this.
id name url
--- ---- ---
1 AAA http://aaa.com?r=123
2 AAA http://aaa.com?r=456
1 BBB http://bbb.com?r=xyz
2 BBB http://bbb.com?r=qsd
3 BBB http://bbb.com?r=fgh
4 BBB http://bbb.com?r=jkl
1 CCC http://ccc.com?r=a23
3 CCC http://ccc.com?r=bc6
What I actually want is to get all unique names with the highest id. So basically this.
id name url
--- ---- ---
2 AAA http://aaa.com?r=456
4 BBB http://bbb.com?r=qsd
3 CCC http://ccc.com?r=bc6
What can I add or change to a query to get that result. | mysql | sql | null | null | null | null | open | MySQL query to get all highest id's
===
I have a sql result that returns something like this.
id name url
--- ---- ---
1 AAA http://aaa.com?r=123
2 AAA http://aaa.com?r=456
1 BBB http://bbb.com?r=xyz
2 BBB http://bbb.com?r=qsd
3 BBB http://bbb.com?r=fgh
4 BBB http://bbb.com?r=jkl
1 CCC http://ccc.com?r=a23
3 CCC http://ccc.com?r=bc6
What I actually want is to get all unique names with the highest id. So basically this.
id name url
--- ---- ---
2 AAA http://aaa.com?r=456
4 BBB http://bbb.com?r=qsd
3 CCC http://ccc.com?r=bc6
What can I add or change to a query to get that result. | 0 |
5,680,056 | 04/15/2011 17:04:31 | 380,714 | 07/01/2010 04:11:29 | 546 | 2 | php strtotime not working | so I converted this string to timestamp using strtotime:
strtotime("1 Nov, 2001");
which results into the timestamp 1320177660
but then when I tried converted 1320177660 into a normal date format again using an online timestamp converter, the year ended up being 2011 rather than 2001...
what am I doing wrong? | php | time | timestamp | strtotime | null | null | open | php strtotime not working
===
so I converted this string to timestamp using strtotime:
strtotime("1 Nov, 2001");
which results into the timestamp 1320177660
but then when I tried converted 1320177660 into a normal date format again using an online timestamp converter, the year ended up being 2011 rather than 2001...
what am I doing wrong? | 0 |
11,263,709 | 06/29/2012 14:32:30 | 276,980 | 02/19/2010 13:29:17 | 109 | 3 | Large gap on the top of my webpage (ASP.NET MVC 3) | I'm using ASP.NET MVC 3. There's a large gap at the top of my page which I can't seem to get rid of. I have my html and body tags both set to 0px for margin and padding. When I inspect it in firefox web developer, it shows this:
<html class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths">
There is absolutely nothing else at the top of the page. So it looks like javascript is the culprit... does anyone know what might be going on? A quick google search suggests it's something to do with something called "modernizr"?
Thanks | html | asp.net-mvc | asp.net-mvc-3 | html5 | null | 06/29/2012 15:05:23 | not a real question | Large gap on the top of my webpage (ASP.NET MVC 3)
===
I'm using ASP.NET MVC 3. There's a large gap at the top of my page which I can't seem to get rid of. I have my html and body tags both set to 0px for margin and padding. When I inspect it in firefox web developer, it shows this:
<html class=" js flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths">
There is absolutely nothing else at the top of the page. So it looks like javascript is the culprit... does anyone know what might be going on? A quick google search suggests it's something to do with something called "modernizr"?
Thanks | 1 |
8,537,479 | 12/16/2011 16:56:48 | 184,326 | 10/05/2009 11:45:41 | 170 | 8 | Installing geminabox Gem with mod_passenger - 'Service Temporarily Unavailable' | i'm trying to install the geminabox application on my server using mod_passenger. But for some reason it's always giving me a 'Service Temporarily Unavailable' and i don't know where to look. I've checked the apache error_log and also put the LogLevel to debug, but i can't find any reason why it's giving me the 'Service Unavailable' message. I have also set the debug level of passenger to level 3 but can't find nothing there. When i go to the /upload url of the application i get the page, but uploading fails. Any idea how i can debug this a bit further? Of even better what's wrong.
I'm using ruby 1.8.7 with passenger 3.0.2 and this is my virtual host config:
<VirtualHost <my_ip>:80>
ServerName geminabox.uranus.kunstmaan.be
ServerAdmin [email protected]
DocumentRoot <path_to_the_project>/data/public
ServerAlias geminabox.uranus.kunstmaan.be www.geminabox.uranus.kunstmaan.be
<Directory <path_to_the_project>/data/public >
Options -Indexes MultiViews Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog <path_to_the_project>/apachelogs/error.log
CustomLog <path_to_the_project>/apachelogs/access.log combined
</VirtualHost>
My passenger log stays empty, in the error log of apache i'm getting this:
[Fri Dec 16 17:53:50 2011] [debug] mod_deflate.c(615): [client 172.18.19.222] Zlib: Compressed 526 to 357 : URL /
If any more information is required please let me know.
kind regards,
Daan | ruby | rubygems | gem | sinatra | passenger | null | open | Installing geminabox Gem with mod_passenger - 'Service Temporarily Unavailable'
===
i'm trying to install the geminabox application on my server using mod_passenger. But for some reason it's always giving me a 'Service Temporarily Unavailable' and i don't know where to look. I've checked the apache error_log and also put the LogLevel to debug, but i can't find any reason why it's giving me the 'Service Unavailable' message. I have also set the debug level of passenger to level 3 but can't find nothing there. When i go to the /upload url of the application i get the page, but uploading fails. Any idea how i can debug this a bit further? Of even better what's wrong.
I'm using ruby 1.8.7 with passenger 3.0.2 and this is my virtual host config:
<VirtualHost <my_ip>:80>
ServerName geminabox.uranus.kunstmaan.be
ServerAdmin [email protected]
DocumentRoot <path_to_the_project>/data/public
ServerAlias geminabox.uranus.kunstmaan.be www.geminabox.uranus.kunstmaan.be
<Directory <path_to_the_project>/data/public >
Options -Indexes MultiViews Includes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog <path_to_the_project>/apachelogs/error.log
CustomLog <path_to_the_project>/apachelogs/access.log combined
</VirtualHost>
My passenger log stays empty, in the error log of apache i'm getting this:
[Fri Dec 16 17:53:50 2011] [debug] mod_deflate.c(615): [client 172.18.19.222] Zlib: Compressed 526 to 357 : URL /
If any more information is required please let me know.
kind regards,
Daan | 0 |
10,115,331 | 04/11/2012 23:21:27 | 799,653 | 06/15/2011 13:22:26 | 1,061 | 11 | PHP/MySQL Limit Characters | Below is a preview of what I am dealing with:
![enter image description here][1]
[1]: http://i.stack.imgur.com/7yvvu.png
The heading, the text, and the image is all dynamically created based on the user. They can choose if they want to add a picture, and they can choose what text to put in the heading and the main content.
There **cannot** be any scrolling, so it has to be visible and cannot go past the bottom of that white.
My question is... how can I limit the text of the body?
- If the heading is large and goes down to two lines, and there is a picture, then in order to stay in the lines and not go past the white it has to be limited to a certain amount of characters.
- But another user could decide to not have a picture and keep the heading in one line, so that user will have more text to write so the limit should be different.
I guess the confusing part for me is like.. what if a user has no picture and has a short heading, and creates some really long text to fit the size, but then later on decides to add an image.. then that long text will now no longer fit. So now.. I can't limit the text because it's already there.
I hope that makes sense. If anyone could help me through this and give me some ideas I would really appreciate it. | php | mysql | css | dynamic | limit | null | open | PHP/MySQL Limit Characters
===
Below is a preview of what I am dealing with:
![enter image description here][1]
[1]: http://i.stack.imgur.com/7yvvu.png
The heading, the text, and the image is all dynamically created based on the user. They can choose if they want to add a picture, and they can choose what text to put in the heading and the main content.
There **cannot** be any scrolling, so it has to be visible and cannot go past the bottom of that white.
My question is... how can I limit the text of the body?
- If the heading is large and goes down to two lines, and there is a picture, then in order to stay in the lines and not go past the white it has to be limited to a certain amount of characters.
- But another user could decide to not have a picture and keep the heading in one line, so that user will have more text to write so the limit should be different.
I guess the confusing part for me is like.. what if a user has no picture and has a short heading, and creates some really long text to fit the size, but then later on decides to add an image.. then that long text will now no longer fit. So now.. I can't limit the text because it's already there.
I hope that makes sense. If anyone could help me through this and give me some ideas I would really appreciate it. | 0 |
1,809,045 | 11/27/2009 14:19:36 | 102,422 | 05/06/2009 19:11:55 | 76 | 2 | chinese search form in flash | i'm working on a menu with a search field, all this menu is done in flash, on the english side works perfect, you write "dah" and it searches for "dah" but on chinese, you write "餅" it posts "??" instead the characters that i want to search for.
I changed the encodig, but it just got things worst, i just can write squares if i change the encoding to big5, lol.
| flash | chinese | big5 | forms | null | null | open | chinese search form in flash
===
i'm working on a menu with a search field, all this menu is done in flash, on the english side works perfect, you write "dah" and it searches for "dah" but on chinese, you write "餅" it posts "??" instead the characters that i want to search for.
I changed the encodig, but it just got things worst, i just can write squares if i change the encoding to big5, lol.
| 0 |
8,386,065 | 12/05/2011 13:30:05 | 1,069,411 | 11/28/2011 13:26:08 | 1 | 0 | Cannot call JavaScript function in PHP | I cannot call JavaScript function in PHP.
Any reference will be help me.
Thanks.
<script type="text/javascript" src="modules/HelpDeskPlus/js/stylemap.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<?php echo '<script type="text/javascript">', 'load();', '</script>'; ?> | php | javascript | null | null | null | 12/05/2011 20:10:56 | not a real question | Cannot call JavaScript function in PHP
===
I cannot call JavaScript function in PHP.
Any reference will be help me.
Thanks.
<script type="text/javascript" src="modules/HelpDeskPlus/js/stylemap.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<?php echo '<script type="text/javascript">', 'load();', '</script>'; ?> | 1 |
10,785,588 | 05/28/2012 13:37:23 | 709,689 | 04/15/2011 11:10:17 | 2,305 | 107 | Pointcut for all methods of a class including inherited ones | I am playing around with aop and aspectj and discovered an (for me) unexpected behavior.
In the [aspectj-docs][1] I found the following example-pointcut:
execution(public void Middle.*())
for the following class-definitions:
class Super {
protected void m() { ... }
}
class Middle extends Super {
}
class Sub extends Middle {
@Override
public void m() { ... }
}
The description of that exmaple states:
> [The pointcut] picks out all method executions for public methods returning void and having no arguments **that are either declared in, or inherited by, Middle**, even if those methods are overridden in a subclass of Middle.
This example is working fine for me but if class `Sub` is not overriding `m()`, the method-calls to `m` on a `Sub`-instance are not intercepted. Doesn't this violates the doc?
I had [another problem with pointcuts in inhertied classes][2] which is caused by the use of proxies. But in this case the use of a proxy cannot cause this behavior because the proxy should provide methods for all of the proxied class. Or did I missed something?
my aspect-definition:
@Aspect
public class MyAspect {
@Before(value = "execution(* Middle.*(..))", argNames="joinPoint")
public void myAdvice(JoinPoint joinPoint) {
System.out.println("adviced: " + joinPoint.getSignature());
}
}
[1]:http://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html
[2]:http://stackoverflow.com/questions/10774946/pointcut-confusion-with-inheritance | java | aspectj | spring-aop | pointcut | null | null | open | Pointcut for all methods of a class including inherited ones
===
I am playing around with aop and aspectj and discovered an (for me) unexpected behavior.
In the [aspectj-docs][1] I found the following example-pointcut:
execution(public void Middle.*())
for the following class-definitions:
class Super {
protected void m() { ... }
}
class Middle extends Super {
}
class Sub extends Middle {
@Override
public void m() { ... }
}
The description of that exmaple states:
> [The pointcut] picks out all method executions for public methods returning void and having no arguments **that are either declared in, or inherited by, Middle**, even if those methods are overridden in a subclass of Middle.
This example is working fine for me but if class `Sub` is not overriding `m()`, the method-calls to `m` on a `Sub`-instance are not intercepted. Doesn't this violates the doc?
I had [another problem with pointcuts in inhertied classes][2] which is caused by the use of proxies. But in this case the use of a proxy cannot cause this behavior because the proxy should provide methods for all of the proxied class. Or did I missed something?
my aspect-definition:
@Aspect
public class MyAspect {
@Before(value = "execution(* Middle.*(..))", argNames="joinPoint")
public void myAdvice(JoinPoint joinPoint) {
System.out.println("adviced: " + joinPoint.getSignature());
}
}
[1]:http://www.eclipse.org/aspectj/doc/released/progguide/semantics-pointcuts.html
[2]:http://stackoverflow.com/questions/10774946/pointcut-confusion-with-inheritance | 0 |
8,253,007 | 11/24/2011 06:31:55 | 1,023,311 | 11/01/2011 08:35:12 | 21 | 0 | When I put more than one jQuery module in one page then it does not work properly and it conflicts.... So is there any kind of solution for it? | When I put more than one jQuery module in one page then it does not work properly and it conflicts like firstly i will use banner rotated then use drop down menu | jquery | html | css | null | null | 11/25/2011 05:09:33 | not a real question | When I put more than one jQuery module in one page then it does not work properly and it conflicts.... So is there any kind of solution for it?
===
When I put more than one jQuery module in one page then it does not work properly and it conflicts like firstly i will use banner rotated then use drop down menu | 1 |
5,087,109 | 02/23/2011 04:47:04 | 629,546 | 02/23/2011 04:47:04 | 1 | 0 | execute a command in javascript | I want to know how to execute a DOS command from javascript.
Please help me.
| javascript | null | null | null | null | 02/23/2011 12:13:26 | not a real question | execute a command in javascript
===
I want to know how to execute a DOS command from javascript.
Please help me.
| 1 |
1,379,987 | 09/04/2009 15:35:37 | 10,771 | 09/16/2008 01:43:47 | 3,910 | 160 | BlueCloth error on windows | Having a bit of a nightmare getting bluecloth to work on windows. I grabbed the gem from the site (since `gem install bluecloth` doesnt work). However, I can't seem to get the library to load
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'bluecloth'
LoadError: no such file to load -- bluecloth_ext
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/Ruby/lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-mingw32/lib/bluecloth.rb:156
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):2
irb(main):003:0>
any thoughts/suggestions? (besides don't use windows =P)
| bluecloth | ruby | rubygems | null | null | null | open | BlueCloth error on windows
===
Having a bit of a nightmare getting bluecloth to work on windows. I grabbed the gem from the site (since `gem install bluecloth` doesnt work). However, I can't seem to get the library to load
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'bluecloth'
LoadError: no such file to load -- bluecloth_ext
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/Ruby/lib/ruby/gems/1.8/gems/bluecloth-2.0.5-x86-mingw32/lib/bluecloth.rb:156
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):2
irb(main):003:0>
any thoughts/suggestions? (besides don't use windows =P)
| 0 |
377,406 | 12/18/2008 09:57:01 | 31,168 | 10/24/2008 13:24:06 | 6 | 0 | MATLAB: Using ODE solvers? | This is a really basic question but this is the first time I've used MATLAB and I'm stuck.
I need to simulate a simple series RC network using 3 different numerical integration techniques. I think I understand how to use the ode solvers, but I have no idea how to enter the differential equation of the system. Do I need to do it via an m-file?
It's just a simple RC circuit in the form:
RC dy(t)/dt + y(t) = u(t)
with zero initial conditions. I have the values for R, C the step length and the simulation time but I don't know how to use MATLAB particularly well.
Any help is much appreciated! | matlab | maths | numerical | integration | null | null | open | MATLAB: Using ODE solvers?
===
This is a really basic question but this is the first time I've used MATLAB and I'm stuck.
I need to simulate a simple series RC network using 3 different numerical integration techniques. I think I understand how to use the ode solvers, but I have no idea how to enter the differential equation of the system. Do I need to do it via an m-file?
It's just a simple RC circuit in the form:
RC dy(t)/dt + y(t) = u(t)
with zero initial conditions. I have the values for R, C the step length and the simulation time but I don't know how to use MATLAB particularly well.
Any help is much appreciated! | 0 |
7,331,740 | 09/07/2011 09:41:51 | 200,145 | 10/31/2009 13:19:36 | 3,037 | 24 | What are the general recommendations regarding using magic for getters and setters? | Coming from strongly typed languages, I'm uncomfortable with the magic getter and setter methods of PHP. What is the motivation behind implementing them into the language and what are the general recommendations regarding using them? | php | null | null | null | null | 09/08/2011 04:27:17 | not constructive | What are the general recommendations regarding using magic for getters and setters?
===
Coming from strongly typed languages, I'm uncomfortable with the magic getter and setter methods of PHP. What is the motivation behind implementing them into the language and what are the general recommendations regarding using them? | 4 |
3,442,605 | 08/09/2010 17:38:28 | 14,433 | 09/16/2008 23:58:16 | 60 | 3 | Code Warranty - clarification | I am working as a consultant doing programming work for a company. I get a flat rate for components in the project (or milestones as we call them). The client recently introduced the idea of 'code warranty' to me. A term which I am unfamiliar with.
He states that 'code warranty' is the period where errors/bugs in the code will be fixed for free and it's typical for developers to give anywhere from a 90 day to 6 month warranty on their code.
Can anyone speak to this? | untagged | null | null | null | null | 07/12/2011 14:18:27 | off topic | Code Warranty - clarification
===
I am working as a consultant doing programming work for a company. I get a flat rate for components in the project (or milestones as we call them). The client recently introduced the idea of 'code warranty' to me. A term which I am unfamiliar with.
He states that 'code warranty' is the period where errors/bugs in the code will be fixed for free and it's typical for developers to give anywhere from a 90 day to 6 month warranty on their code.
Can anyone speak to this? | 2 |
10,950,280 | 06/08/2012 13:58:43 | 1,444,691 | 06/08/2012 13:54:02 | 1 | 0 | Kafka consumer gets suspended when run with Tomcat | I'm using kafka-0.6 library with spring for a web application which is intended to read from and write to a queue. The java class is as below;
=============================================================================
package xxx.xxxx.handlers;
import xxx.xxxx.kafka.builders.Builder;
import kafka.consumer.ConsumerIterator;
import kafka.consumer.KafkaMessageStream;
import kafka.javaapi.consumer.ConsumerConnector;
import kafka.javaapi.producer.Producer;
import kafka.javaapi.producer.ProducerData;
import kafka.message.Message;
import org.slf4j.Logger;
import java.io.*;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
*
*/
public class DefaultQueueHandler implements QueueHandler {
private Producer<String, Serializable> producer;
private ConsumerConnector consumer;
private ConsumerIterator it;
private Properties consumerProperties;
private Properties producerProperties;
private String messageKey;
private String topic = "topic";
private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(DefaultQueueHandler.class);
public void init() {
LOGGER.debug("INIT" + this);
producer = Builder.buildProducer(producerProperties);
consumer = Builder.buildConsumerConnector(consumerProperties);
Map<String, Integer> topicCountMap = new HashMap<String, Integer>();
topicCountMap.put(topic, new Integer(1));
Map<String, List<KafkaMessageStream>> consumerMap = consumer.createMessageStreams(topicCountMap);
KafkaMessageStream stream = consumerMap.get(topic).get(0);
it = stream.iterator();
}
public void enqueue(Map<String, Serializable> message) {
producer.send(new ProducerData<String, Serializable>(topic, message.get(messageKey)));
}
public Map<String, Serializable> dequeue() throws ClassNotFoundException, IOException {
if (it.hasNext()) {
return getMapFromMessage(it.next());
}
return null;
}
private Map<String, Serializable> getMapFromMessage(Message message) throws IOException, ClassNotFoundException {
ByteBuffer buffer = message.payload();
byte[] dataBytes = new byte[buffer.remaining()];
buffer.get(dataBytes);
ByteArrayInputStream bais = new ByteArrayInputStream(dataBytes);
ObjectInput oi = new ObjectInputStream(bais);
return (Map<String, Serializable>) oi.readObject();
}
public void setConsumerProperties(Properties consumerProperties) {
this.consumerProperties = consumerProperties;
}
public void setProducerProperties(Properties producerProperties) {
this.producerProperties = producerProperties;
}
public void setMessageKey(String messageKey) {
this.messageKey = messageKey;
}
public void setTopic(String topic) {
this.topic = topic;
}
}
=============================================================================
The init() method is called on system start up (soon after the war file is deployed on tomcat). The flow suspends at "it.hasNext()" of the dequeue() method and no errors are thrown. However the code runs fine in a stand-alone application (without tomcat).
What should be the issue? Please help.
thanks,
Shyarmal. | apache-kafka | null | null | null | null | null | open | Kafka consumer gets suspended when run with Tomcat
===
I'm using kafka-0.6 library with spring for a web application which is intended to read from and write to a queue. The java class is as below;
=============================================================================
package xxx.xxxx.handlers;
import xxx.xxxx.kafka.builders.Builder;
import kafka.consumer.ConsumerIterator;
import kafka.consumer.KafkaMessageStream;
import kafka.javaapi.consumer.ConsumerConnector;
import kafka.javaapi.producer.Producer;
import kafka.javaapi.producer.ProducerData;
import kafka.message.Message;
import org.slf4j.Logger;
import java.io.*;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
*
*/
public class DefaultQueueHandler implements QueueHandler {
private Producer<String, Serializable> producer;
private ConsumerConnector consumer;
private ConsumerIterator it;
private Properties consumerProperties;
private Properties producerProperties;
private String messageKey;
private String topic = "topic";
private static final Logger LOGGER = org.slf4j.LoggerFactory.getLogger(DefaultQueueHandler.class);
public void init() {
LOGGER.debug("INIT" + this);
producer = Builder.buildProducer(producerProperties);
consumer = Builder.buildConsumerConnector(consumerProperties);
Map<String, Integer> topicCountMap = new HashMap<String, Integer>();
topicCountMap.put(topic, new Integer(1));
Map<String, List<KafkaMessageStream>> consumerMap = consumer.createMessageStreams(topicCountMap);
KafkaMessageStream stream = consumerMap.get(topic).get(0);
it = stream.iterator();
}
public void enqueue(Map<String, Serializable> message) {
producer.send(new ProducerData<String, Serializable>(topic, message.get(messageKey)));
}
public Map<String, Serializable> dequeue() throws ClassNotFoundException, IOException {
if (it.hasNext()) {
return getMapFromMessage(it.next());
}
return null;
}
private Map<String, Serializable> getMapFromMessage(Message message) throws IOException, ClassNotFoundException {
ByteBuffer buffer = message.payload();
byte[] dataBytes = new byte[buffer.remaining()];
buffer.get(dataBytes);
ByteArrayInputStream bais = new ByteArrayInputStream(dataBytes);
ObjectInput oi = new ObjectInputStream(bais);
return (Map<String, Serializable>) oi.readObject();
}
public void setConsumerProperties(Properties consumerProperties) {
this.consumerProperties = consumerProperties;
}
public void setProducerProperties(Properties producerProperties) {
this.producerProperties = producerProperties;
}
public void setMessageKey(String messageKey) {
this.messageKey = messageKey;
}
public void setTopic(String topic) {
this.topic = topic;
}
}
=============================================================================
The init() method is called on system start up (soon after the war file is deployed on tomcat). The flow suspends at "it.hasNext()" of the dequeue() method and no errors are thrown. However the code runs fine in a stand-alone application (without tomcat).
What should be the issue? Please help.
thanks,
Shyarmal. | 0 |
2,226,376 | 02/09/2010 02:35:16 | 96,846 | 04/28/2009 00:54:20 | 15 | 0 | Why do programming texts always use an "Employee" entity? |
Is there something special about an Employee entity that makes it desirable to use it so frequently in programming texts?
Are there any other entities that would serve just as well? | database | null | null | null | null | 02/09/2010 12:49:33 | not a real question | Why do programming texts always use an "Employee" entity?
===
Is there something special about an Employee entity that makes it desirable to use it so frequently in programming texts?
Are there any other entities that would serve just as well? | 1 |
10,572,024 | 05/13/2012 13:11:08 | 1,234,813 | 02/27/2012 04:38:39 | 117 | 10 | GAE why am i billed less instances than im using? | I have a limit of 1 instance min and max in the settings.
But why is GAE using more than one instance and its not billing it to me?
![instances][1]
[1]: http://i.stack.imgur.com/uRG3X.png | google-app-engine | null | null | null | null | 05/14/2012 02:32:22 | off topic | GAE why am i billed less instances than im using?
===
I have a limit of 1 instance min and max in the settings.
But why is GAE using more than one instance and its not billing it to me?
![instances][1]
[1]: http://i.stack.imgur.com/uRG3X.png | 2 |
8,846,306 | 01/13/2012 05:23:03 | 1,122,921 | 12/30/2011 12:36:23 | 1 | 0 | string array in spinner | i have an array which is populated in the spinner adapter.
now i wanna change the size of the array! is it possible?
help!
thank u
`public void classpopulate() {
if (PEP.getUser() == null) {
return;
}
classdetails = masterDataManager.getClassSections(PEP.getUser()
.getUsername(), getApplicationContext());
spnrClass = (Spinner) findViewById(R.id.spnrClass);
spnrSubject = (Spinner) findViewById(R.id.spnrSubject);
classname = new String[classdetails.size() + 1];
classname[0] = "SELECET CLASS";
for (int i = 1; i < classdetails.size() + 1; i++) {
classname[i] = classdetails.get(i - 1).getClass_name() + " "
+ classdetails.get(i - 1).getSection_name().toString();
}
ArrayAdapter<CharSequence> adapterClasses = new ArrayAdapter<CharSequence>(
getApplicationContext(), R.layout.spinner_item_class,
R.id.spinnerclasstxt, classname);
spnrClass.setAdapter(adapterClasses);
spnrClass.setSelection(0);
spnrClass
.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int pos, long arg3) {
// LinearLayout layoutSpinnersubj = (LinearLayout)
// findViewById(R.id.layout_spinner);
// RelativeLayout subject_Text
// =(RelativeLayout)findViewById(R.id.layoutsubjecttext);
int selectedindex = pos;
if (selectedindex == 0) {
spnrSubject.setVisibility(View.INVISIBLE);
} else {
spnrSubject.setVisibility(View.VISIBLE);
selectedClass = classdetails.get(selectedindex - 1);
subjectpopulate(selectedClass);
}
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
` | android | null | null | null | null | null | open | string array in spinner
===
i have an array which is populated in the spinner adapter.
now i wanna change the size of the array! is it possible?
help!
thank u
`public void classpopulate() {
if (PEP.getUser() == null) {
return;
}
classdetails = masterDataManager.getClassSections(PEP.getUser()
.getUsername(), getApplicationContext());
spnrClass = (Spinner) findViewById(R.id.spnrClass);
spnrSubject = (Spinner) findViewById(R.id.spnrSubject);
classname = new String[classdetails.size() + 1];
classname[0] = "SELECET CLASS";
for (int i = 1; i < classdetails.size() + 1; i++) {
classname[i] = classdetails.get(i - 1).getClass_name() + " "
+ classdetails.get(i - 1).getSection_name().toString();
}
ArrayAdapter<CharSequence> adapterClasses = new ArrayAdapter<CharSequence>(
getApplicationContext(), R.layout.spinner_item_class,
R.id.spinnerclasstxt, classname);
spnrClass.setAdapter(adapterClasses);
spnrClass.setSelection(0);
spnrClass
.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,
int pos, long arg3) {
// LinearLayout layoutSpinnersubj = (LinearLayout)
// findViewById(R.id.layout_spinner);
// RelativeLayout subject_Text
// =(RelativeLayout)findViewById(R.id.layoutsubjecttext);
int selectedindex = pos;
if (selectedindex == 0) {
spnrSubject.setVisibility(View.INVISIBLE);
} else {
spnrSubject.setVisibility(View.VISIBLE);
selectedClass = classdetails.get(selectedindex - 1);
subjectpopulate(selectedClass);
}
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
` | 0 |
2,781,672 | 05/06/2010 14:08:57 | 334,486 | 05/06/2010 13:37:34 | 1 | 0 | When is a parameterized method call useful? | A Java method call may be parameterized like in the following code:
class Test
{
<T> void test()
{
}
public static void main(String[] args)
{
new Test().<Object>test();
// ^^^^^^^^
}
}
I found out this is possible from the Eclipse Java Formatter settings dialog and wondered if there are any cases where this is useful or required. | java | generics | methods | call | parameters | null | open | When is a parameterized method call useful?
===
A Java method call may be parameterized like in the following code:
class Test
{
<T> void test()
{
}
public static void main(String[] args)
{
new Test().<Object>test();
// ^^^^^^^^
}
}
I found out this is possible from the Eclipse Java Formatter settings dialog and wondered if there are any cases where this is useful or required. | 0 |
4,636,289 | 01/08/2011 21:38:02 | 413,495 | 08/06/2010 21:31:09 | 20 | 0 | Need better explanation of a mathematical/programming problem? | The problem is:
For a prime number p the set of co-primes less than or equal to it is given by {1,2,3,4,...p-1} .
We define f(x,p) 0<x<p = 1 if and only if all the numbers from 1 to p-1 can be written as a power of x in modulo-p arithmetic .
Let n be the largest 12-digit prime number . Find the product of all integers j less than n such that f(j,n)=1, in modulo-n arithmetic
Can anyone give me a better explanation? | math | problem-solving | null | null | null | 01/09/2011 06:24:19 | off topic | Need better explanation of a mathematical/programming problem?
===
The problem is:
For a prime number p the set of co-primes less than or equal to it is given by {1,2,3,4,...p-1} .
We define f(x,p) 0<x<p = 1 if and only if all the numbers from 1 to p-1 can be written as a power of x in modulo-p arithmetic .
Let n be the largest 12-digit prime number . Find the product of all integers j less than n such that f(j,n)=1, in modulo-n arithmetic
Can anyone give me a better explanation? | 2 |
10,757,631 | 05/25/2012 15:53:56 | 1,417,779 | 05/25/2012 15:47:07 | 1 | 0 | Conversion from string "UNITID, INSTNM, ADDR, CITY, STAB" to type 'Integer' is not valid | Hey i'm new to this and need help ASAP!
i am geting a error:
InvalidCastException was unhandled by user code
Conversion from string "UNITID, INSTNM, ADDR, CITY, STAB" to type 'Integer' is not valid.
here is my code:
Dim WFSDINSTITUTION As String =""
Dim WFSDSTRING As New System.Data.SqlClient.SqlConnection
WFSDSTRING.ConnectionString ="Data Source=LED-SQL;Initial Catalog=WorkforceSD_DEV;Integrated Security=True"
WFSDSTRING.Open()
Dim Institution As String ="Provider = Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\CSchexnaydre\Desktop\TEST SHEETS\Institution\INST_TEST2010.csv;HDR=YES;"
Using INSTITUTIONCONNECTION As New System.Data.OleDb.OleDbConnection(Institution)
Dim INST_TABLE As New Data.DataTable()
INST_TABLE.Columns.Add("UNITID")
INST_TABLE.Columns.Add("INSTNM")
INST_TABLE.Columns.Add("ADDR")
INST_TABLE.Columns.Add("CITY")
INST_TABLE.Columns.Add("STABBR")
INST_TABLE.Columns.Add("ZIP")
INST_TABLE.Columns.Add("FIPS")
INST_TABLE.Columns.Add("OBEREG")
INST_TABLE.Columns.Add("CHFNM")
INST_TABLE.Columns.Add("CHFTITLE")
INST_TABLE.Columns.Add("GENTELE")
INST_TABLE.Columns.Add("ENI")
INST_TABLE.Columns.Add("OPEID")
INST_TABLE.Columns.Add("OPEFLAG")
INST_TABLE.Columns.Add("WEBADDR")
INST_TABLE.Columns.Add("ADMINURL")
INST_TABLE.Columns.Add("FAIDURL")
INST_TABLE.Columns.Add("APPLURL")
INST_TABLE.Columns.Add("ICLEVEL")
INST_TABLE.Columns.Add("CONTROL")
INST_TABLE.Columns.Add("HLOFFER")
INST_TABLE.Columns.Add("UGOFFER")
INST_TABLE.Columns.Add("GROFFER")
INST_TABLE.Columns.Add("HDEGOFR1")
INST_TABLE.Columns.Add("DEGGRANT")
INST_TABLE.Columns.Add("HBCU")
INST_TABLE.Columns.Add("HOSPITAL")
INST_TABLE.Columns.Add("MEDICAL")
INST_TABLE.Columns.Add("TRIBAL")
INST_TABLE.Columns.Add("LOCALE")
INST_TABLE.Columns.Add("OPENPUBL")
INST_TABLE.Columns.Add("ACT")
INST_TABLE.Columns.Add("NEWID")
INST_TABLE.Columns.Add("DEATHYR")
INST_TABLE.Columns.Add("CLOSEDAT")
INST_TABLE.Columns.Add("CYACTIVE")
INST_TABLE.Columns.Add("POSTSEC")
INST_TABLE.Columns.Add("PSEFLAG")
INST_TABLE.Columns.Add("PSET4FLG")
INST_TABLE.Columns.Add("RPTMTH")
INST_TABLE.Columns.Add("IALIAS")
INST_TABLE.Columns.Add("INSTCAT")
INST_TABLE.Columns.Add("CCBASIC")
INST_TABLE.Columns.Add("CCIPUG")
INST_TABLE.Columns.Add("CCIPGRAD")
INST_TABLE.Columns.Add("CCUGPROF")
INST_TABLE.Columns.Add("CCENRPRF")
INST_TABLE.Columns.Add("CCSIZSET")
INST_TABLE.Columns.Add("CARNEGIE")
INST_TABLE.Columns.Add("TENURSYS")
INST_TABLE.Columns.Add("LANDGRNT")
INST_TABLE.Columns.Add("INSTSIZE")
INST_TABLE.Columns.Add("CBSA")
INST_TABLE.Columns.Add("CBSATYPE")
INST_TABLE.Columns.Add("CSA")
INST_TABLE.Columns.Add("NECTA")
INST_TABLE.Columns.Add("F1SYSTYP")
INST_TABLE.Columns.Add("F1SYSNAM")
INST_TABLE.Columns.Add("FAXTELE")
Dim INST_TEST2010 As New FileIO.TextFieldParser("C:\Documents and Settings\CSchexnaydre\Desktop\TEST SHEETS\Institution\INST_TEST2010.csv")
INST_TEST2010.Delimiters =New String() {","}
INST_TEST2010.HasFieldsEnclosedInQuotes =True
INST_TEST2010.TrimWhiteSpace =True
INST_TEST2010.ReadLine()
Do Until INST_TEST2010.EndOfData = True
INST_TABLE.Rows.Add(INST_TEST2010.ReadFields("UNITID, INSTNM, ADDR, CITY, STABBR, ZIP, FIPS, OBEREG, CHFNM, CHFTITLE, GENTELE, EIN, OPEID, OPEFLAG, WEBADDR, ADMINURL, FAIDURL, APPLURL, ICLEVEL, CONTROL, HLOFFER, UGOFFER, GROFFER, HDEGOFR1, DEGGRANT, HBCU, HOSPITAL, MEDICAL, TRIBAL, LOCALE, OPENPUBL, ACT, NEWID, DEATHYR, CLOSEDAT, CYACTIVE, POSTSEC, PSEFLAG, PSET4FLG, RPTMTH, IALIAS, INSTCAT, CCBASIC, CCIPUG, CCIPGRAD, CCUGPROF, CCENRPRF, CCSIZSET, CARNEGIE, TENURSYS, LANDGRNT, INSTSIZE, CBSA, CBSATYPE, CSA, NECTA, F1SYSTYP, F1SYSNAM, FAXTELE"))
Loop
Dim i As Integer
Dim INSERT_INST_COMMAND = New System.Data.SqlClient.SqlCommand
INSERT_INST_COMMAND = WFSDSTRING.CreateCommand()
For Each row In INST_TABLE.Rows
INSERT_INST_COMMAND.CommandText ="INSERT INTO Institution_UPLOAD (Institution_ID, Institution_Name, Address_1, City, State_Code, Zip, FIPS, OBE_Region_ID, Chief_Admin_Name_ID, Chief_Admin_Title_ID, Institution_Phone, ENI, OPE_Number, OPEFLAG_ID, Institution_Web, Admission_Web, Financial_Web, Application_Web, Type_Of_Institution_ID, Level_Of_Institution_ID, HLOFFER_ID, UGOFFER_ID, GROFFER_ID, HDEGOFR1_ID, DEGGRANT_ID, Historic_Black_College_ID, Hospital_Available_ID, Medical_Degree_ID, Tribal_College_ID, Location_ID, Open_To_Public, ACT_ID, New_ID, Deleted_Year, Closed_Date, CYACTIVE_ID, POSTEC_ID, PSEFLAG_ID, PSET4FLG_ID, RPTMTH_ID, INSTCAT_ID, ALIAS, CCBASIC_ID, CCIPUG_ID, CCIPGRAD_ID, CCUGPROF_ID, CCENPRF_ID, CCSIZSET_ID, CARNEGIE_ID, TENURSYS_ID, Land_Grant_Institution_ID, Size_Of_Institution_ID, CBSA_ID, CBSATYPE_ID, CSA_ID, NECTA_ID, F1SYSTYP_ID, F1SYSNAM, Institution_Fax) VALUES ("_
& "'" & row("UNITID") & "'," _
& "'" & row("INSTNM") & "'," _
& "'" & row("ADDR") & "'," _
& "'" & row("CITY") & "'," _
& "'" & row("STABBR") & "'," _
& "'" & row("ZIP") & "'," _
& "'" & row("FIPS") & "'," _
& "'" & row("OBEREG") & "'," _
& "'" & row("CHFNM") & "'," _
& "'" & row("CHFTITLE") & "'," _
& "'" & row("GENTELE") & "'," _
& "'" & row("ENI") & "'," _
& "'" & row("OPEID") & "'," _
& "'" & row("OPEFLAG") & "'," _
& "'" & row("WEBADDR") & "'," _
& "'" & row("ADMINURL") & "'," _
& "'" & row("FAIDURL") & "'," _
& "'" & row("APPLURL") & "'," _
& "'" & row("ICLEVEL") & "'," _
& "'" & row("CONTROL") & "'," _
& "'" & row("HLOFFER") & "'," _
& "'" & row("UGOFFER") & "'," _
& "'" & row("GROFFER") & "'," _
& "'" & row("HDEGOFR1") & "'," _
& "'" & row("DEGGRANT") & "'," _
& "'" & row("HBCU") & "'," _
& "'" & row("HOSPITAL") & "'," _
& "'" & row("MEDICAL") & "'," _
& "'" & row("TRIBAL") & "'," _
& "'" & row("LOCALE") & "'," _
& "'" & row("OPENPUBL") & "'," _
& "'" & row("ACT") & "'," _
& "'" & row("NEWID") & "'," _
& "'" & row("DEATHYR") & "'," _
& "'" & row("CLOSEDAT") & "'," _
& "'" & row("CYACTIVE") & "'," _
& "'" & row("POSTSEC") & "'," _
& "'" & row("PSEFLAG") & "'," _
& "'" & row("PSET4FLG") & "'," _
& "'" & row("RPTMTH") & "'," _
& "'" & row("IALIAS") & "'," _
& "'" & row("INSTCAT") & "'," _
& "'" & row("CCBASIC") & "'," _
& "'" & row("CCIPUG") & "'," _
& "'" & row("CCIPGRAD") & "'," _
& "'" & row("CCUGPROF") & "'," _
& "'" & row("CCENRPRF") & "'," _
& "'" & row("CCSIZSET") & "'," _
& "'" & row("CARNEGIE") & "'," _
& "'" & row("TENURSYS") & "'," _
& "'" & row("LANDGRNT") & "'," _
& "'" & row("INSTSIZE") & "'," _
& "'" & row("CBSA") & "'," _
& "'" & row("CBSATYPE") & "'," _
& "'" & row("CSA") & "'," _
& "'" & row("NECTA") & "'," _
& "'" & row("F1SYSTYP") & "'," _
& "'" & row("F1SYSNAM") & "'," _
& "'" & row("FAXTELE") & "')"
i = INSERT_INST_COMMAND.ExecuteNonQuery()
Next
End Using
End
the error comes from the part under lined. the file is a .csv going into a SQL Database. need help asap!
Thankz in advance!
| asp.net | sql | vb.net | null | null | 05/25/2012 17:34:52 | not a real question | Conversion from string "UNITID, INSTNM, ADDR, CITY, STAB" to type 'Integer' is not valid
===
Hey i'm new to this and need help ASAP!
i am geting a error:
InvalidCastException was unhandled by user code
Conversion from string "UNITID, INSTNM, ADDR, CITY, STAB" to type 'Integer' is not valid.
here is my code:
Dim WFSDINSTITUTION As String =""
Dim WFSDSTRING As New System.Data.SqlClient.SqlConnection
WFSDSTRING.ConnectionString ="Data Source=LED-SQL;Initial Catalog=WorkforceSD_DEV;Integrated Security=True"
WFSDSTRING.Open()
Dim Institution As String ="Provider = Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\CSchexnaydre\Desktop\TEST SHEETS\Institution\INST_TEST2010.csv;HDR=YES;"
Using INSTITUTIONCONNECTION As New System.Data.OleDb.OleDbConnection(Institution)
Dim INST_TABLE As New Data.DataTable()
INST_TABLE.Columns.Add("UNITID")
INST_TABLE.Columns.Add("INSTNM")
INST_TABLE.Columns.Add("ADDR")
INST_TABLE.Columns.Add("CITY")
INST_TABLE.Columns.Add("STABBR")
INST_TABLE.Columns.Add("ZIP")
INST_TABLE.Columns.Add("FIPS")
INST_TABLE.Columns.Add("OBEREG")
INST_TABLE.Columns.Add("CHFNM")
INST_TABLE.Columns.Add("CHFTITLE")
INST_TABLE.Columns.Add("GENTELE")
INST_TABLE.Columns.Add("ENI")
INST_TABLE.Columns.Add("OPEID")
INST_TABLE.Columns.Add("OPEFLAG")
INST_TABLE.Columns.Add("WEBADDR")
INST_TABLE.Columns.Add("ADMINURL")
INST_TABLE.Columns.Add("FAIDURL")
INST_TABLE.Columns.Add("APPLURL")
INST_TABLE.Columns.Add("ICLEVEL")
INST_TABLE.Columns.Add("CONTROL")
INST_TABLE.Columns.Add("HLOFFER")
INST_TABLE.Columns.Add("UGOFFER")
INST_TABLE.Columns.Add("GROFFER")
INST_TABLE.Columns.Add("HDEGOFR1")
INST_TABLE.Columns.Add("DEGGRANT")
INST_TABLE.Columns.Add("HBCU")
INST_TABLE.Columns.Add("HOSPITAL")
INST_TABLE.Columns.Add("MEDICAL")
INST_TABLE.Columns.Add("TRIBAL")
INST_TABLE.Columns.Add("LOCALE")
INST_TABLE.Columns.Add("OPENPUBL")
INST_TABLE.Columns.Add("ACT")
INST_TABLE.Columns.Add("NEWID")
INST_TABLE.Columns.Add("DEATHYR")
INST_TABLE.Columns.Add("CLOSEDAT")
INST_TABLE.Columns.Add("CYACTIVE")
INST_TABLE.Columns.Add("POSTSEC")
INST_TABLE.Columns.Add("PSEFLAG")
INST_TABLE.Columns.Add("PSET4FLG")
INST_TABLE.Columns.Add("RPTMTH")
INST_TABLE.Columns.Add("IALIAS")
INST_TABLE.Columns.Add("INSTCAT")
INST_TABLE.Columns.Add("CCBASIC")
INST_TABLE.Columns.Add("CCIPUG")
INST_TABLE.Columns.Add("CCIPGRAD")
INST_TABLE.Columns.Add("CCUGPROF")
INST_TABLE.Columns.Add("CCENRPRF")
INST_TABLE.Columns.Add("CCSIZSET")
INST_TABLE.Columns.Add("CARNEGIE")
INST_TABLE.Columns.Add("TENURSYS")
INST_TABLE.Columns.Add("LANDGRNT")
INST_TABLE.Columns.Add("INSTSIZE")
INST_TABLE.Columns.Add("CBSA")
INST_TABLE.Columns.Add("CBSATYPE")
INST_TABLE.Columns.Add("CSA")
INST_TABLE.Columns.Add("NECTA")
INST_TABLE.Columns.Add("F1SYSTYP")
INST_TABLE.Columns.Add("F1SYSNAM")
INST_TABLE.Columns.Add("FAXTELE")
Dim INST_TEST2010 As New FileIO.TextFieldParser("C:\Documents and Settings\CSchexnaydre\Desktop\TEST SHEETS\Institution\INST_TEST2010.csv")
INST_TEST2010.Delimiters =New String() {","}
INST_TEST2010.HasFieldsEnclosedInQuotes =True
INST_TEST2010.TrimWhiteSpace =True
INST_TEST2010.ReadLine()
Do Until INST_TEST2010.EndOfData = True
INST_TABLE.Rows.Add(INST_TEST2010.ReadFields("UNITID, INSTNM, ADDR, CITY, STABBR, ZIP, FIPS, OBEREG, CHFNM, CHFTITLE, GENTELE, EIN, OPEID, OPEFLAG, WEBADDR, ADMINURL, FAIDURL, APPLURL, ICLEVEL, CONTROL, HLOFFER, UGOFFER, GROFFER, HDEGOFR1, DEGGRANT, HBCU, HOSPITAL, MEDICAL, TRIBAL, LOCALE, OPENPUBL, ACT, NEWID, DEATHYR, CLOSEDAT, CYACTIVE, POSTSEC, PSEFLAG, PSET4FLG, RPTMTH, IALIAS, INSTCAT, CCBASIC, CCIPUG, CCIPGRAD, CCUGPROF, CCENRPRF, CCSIZSET, CARNEGIE, TENURSYS, LANDGRNT, INSTSIZE, CBSA, CBSATYPE, CSA, NECTA, F1SYSTYP, F1SYSNAM, FAXTELE"))
Loop
Dim i As Integer
Dim INSERT_INST_COMMAND = New System.Data.SqlClient.SqlCommand
INSERT_INST_COMMAND = WFSDSTRING.CreateCommand()
For Each row In INST_TABLE.Rows
INSERT_INST_COMMAND.CommandText ="INSERT INTO Institution_UPLOAD (Institution_ID, Institution_Name, Address_1, City, State_Code, Zip, FIPS, OBE_Region_ID, Chief_Admin_Name_ID, Chief_Admin_Title_ID, Institution_Phone, ENI, OPE_Number, OPEFLAG_ID, Institution_Web, Admission_Web, Financial_Web, Application_Web, Type_Of_Institution_ID, Level_Of_Institution_ID, HLOFFER_ID, UGOFFER_ID, GROFFER_ID, HDEGOFR1_ID, DEGGRANT_ID, Historic_Black_College_ID, Hospital_Available_ID, Medical_Degree_ID, Tribal_College_ID, Location_ID, Open_To_Public, ACT_ID, New_ID, Deleted_Year, Closed_Date, CYACTIVE_ID, POSTEC_ID, PSEFLAG_ID, PSET4FLG_ID, RPTMTH_ID, INSTCAT_ID, ALIAS, CCBASIC_ID, CCIPUG_ID, CCIPGRAD_ID, CCUGPROF_ID, CCENPRF_ID, CCSIZSET_ID, CARNEGIE_ID, TENURSYS_ID, Land_Grant_Institution_ID, Size_Of_Institution_ID, CBSA_ID, CBSATYPE_ID, CSA_ID, NECTA_ID, F1SYSTYP_ID, F1SYSNAM, Institution_Fax) VALUES ("_
& "'" & row("UNITID") & "'," _
& "'" & row("INSTNM") & "'," _
& "'" & row("ADDR") & "'," _
& "'" & row("CITY") & "'," _
& "'" & row("STABBR") & "'," _
& "'" & row("ZIP") & "'," _
& "'" & row("FIPS") & "'," _
& "'" & row("OBEREG") & "'," _
& "'" & row("CHFNM") & "'," _
& "'" & row("CHFTITLE") & "'," _
& "'" & row("GENTELE") & "'," _
& "'" & row("ENI") & "'," _
& "'" & row("OPEID") & "'," _
& "'" & row("OPEFLAG") & "'," _
& "'" & row("WEBADDR") & "'," _
& "'" & row("ADMINURL") & "'," _
& "'" & row("FAIDURL") & "'," _
& "'" & row("APPLURL") & "'," _
& "'" & row("ICLEVEL") & "'," _
& "'" & row("CONTROL") & "'," _
& "'" & row("HLOFFER") & "'," _
& "'" & row("UGOFFER") & "'," _
& "'" & row("GROFFER") & "'," _
& "'" & row("HDEGOFR1") & "'," _
& "'" & row("DEGGRANT") & "'," _
& "'" & row("HBCU") & "'," _
& "'" & row("HOSPITAL") & "'," _
& "'" & row("MEDICAL") & "'," _
& "'" & row("TRIBAL") & "'," _
& "'" & row("LOCALE") & "'," _
& "'" & row("OPENPUBL") & "'," _
& "'" & row("ACT") & "'," _
& "'" & row("NEWID") & "'," _
& "'" & row("DEATHYR") & "'," _
& "'" & row("CLOSEDAT") & "'," _
& "'" & row("CYACTIVE") & "'," _
& "'" & row("POSTSEC") & "'," _
& "'" & row("PSEFLAG") & "'," _
& "'" & row("PSET4FLG") & "'," _
& "'" & row("RPTMTH") & "'," _
& "'" & row("IALIAS") & "'," _
& "'" & row("INSTCAT") & "'," _
& "'" & row("CCBASIC") & "'," _
& "'" & row("CCIPUG") & "'," _
& "'" & row("CCIPGRAD") & "'," _
& "'" & row("CCUGPROF") & "'," _
& "'" & row("CCENRPRF") & "'," _
& "'" & row("CCSIZSET") & "'," _
& "'" & row("CARNEGIE") & "'," _
& "'" & row("TENURSYS") & "'," _
& "'" & row("LANDGRNT") & "'," _
& "'" & row("INSTSIZE") & "'," _
& "'" & row("CBSA") & "'," _
& "'" & row("CBSATYPE") & "'," _
& "'" & row("CSA") & "'," _
& "'" & row("NECTA") & "'," _
& "'" & row("F1SYSTYP") & "'," _
& "'" & row("F1SYSNAM") & "'," _
& "'" & row("FAXTELE") & "')"
i = INSERT_INST_COMMAND.ExecuteNonQuery()
Next
End Using
End
the error comes from the part under lined. the file is a .csv going into a SQL Database. need help asap!
Thankz in advance!
| 1 |
1,094,041 | 07/07/2009 18:37:55 | 127,257 | 06/22/2009 23:54:43 | 123 | 4 | How do I use native Lucene Query Syntax? | I read that Lucene has an internal query language where one specifies <field>:<value> and you make combinations of these using boolean operators.
I read all about it on their website and it works just fine in LUKE, I can do things like
field1:value1 AND field2:value2
and it will return seemingly correct results.
My problem is how do I pass this who Lucene query into the API? I've seen QueryParser, but I have to specifiy a field. Does this mean I still have to manually parse my input string, fields, values, parenthesis, etc or is there a way to feed the whole thing in and let lucene do it's thing?
I'm using Lucene.NET but since it's a method by method port of the orignal java, any advice is appreciated. | lucene | lucene.net | null | null | null | null | open | How do I use native Lucene Query Syntax?
===
I read that Lucene has an internal query language where one specifies <field>:<value> and you make combinations of these using boolean operators.
I read all about it on their website and it works just fine in LUKE, I can do things like
field1:value1 AND field2:value2
and it will return seemingly correct results.
My problem is how do I pass this who Lucene query into the API? I've seen QueryParser, but I have to specifiy a field. Does this mean I still have to manually parse my input string, fields, values, parenthesis, etc or is there a way to feed the whole thing in and let lucene do it's thing?
I'm using Lucene.NET but since it's a method by method port of the orignal java, any advice is appreciated. | 0 |
821,740 | 05/04/2009 20:00:19 | 24,197 | 10/01/2008 16:04:52 | 207 | 18 | Is this interview question too hard for a php dev. job? | We're looking for someone to help us enhance & maintain our high-quality, php-based prototype of a transactional web app. Ideally, who can communicate well, and do both front- and back-end web development (as well as smart/gets things done, etc.). Among other more general things, I've been using this question:
<blockquote>
Given this:
<pre>
$foo = array(1, 3, 7);
</pre>
write a function (on this whiteboard) to sum the values of the array.
</blockquote>
It seems trivially easy to me, but has caused a couple of deer-in-the-headlights situations, which always makes me feel like a villain.
I've read a number of posts here and there (including both Joel's and Jeff's) saying that how candidates think, design skills, passion, etc. are more important than any specific technical skill, and I agree with that. Also, I can see that programming at a whiteboard is a little unrealistic. OTOH, this seems so basic to me that I'm inclined to see it as a fine first-pass filter between front-end devs (who know their way around html, css, and how to copy-and-paste a js function or two), and people who can really code. Thoughts?
| interview-questions | php | null | null | null | 12/03/2011 06:17:19 | not constructive | Is this interview question too hard for a php dev. job?
===
We're looking for someone to help us enhance & maintain our high-quality, php-based prototype of a transactional web app. Ideally, who can communicate well, and do both front- and back-end web development (as well as smart/gets things done, etc.). Among other more general things, I've been using this question:
<blockquote>
Given this:
<pre>
$foo = array(1, 3, 7);
</pre>
write a function (on this whiteboard) to sum the values of the array.
</blockquote>
It seems trivially easy to me, but has caused a couple of deer-in-the-headlights situations, which always makes me feel like a villain.
I've read a number of posts here and there (including both Joel's and Jeff's) saying that how candidates think, design skills, passion, etc. are more important than any specific technical skill, and I agree with that. Also, I can see that programming at a whiteboard is a little unrealistic. OTOH, this seems so basic to me that I'm inclined to see it as a fine first-pass filter between front-end devs (who know their way around html, css, and how to copy-and-paste a js function or two), and people who can really code. Thoughts?
| 4 |
11,735,984 | 07/31/2012 08:25:06 | 315,445 | 04/13/2010 12:12:29 | 431 | 37 | Linq groupby on IEnumerable DataRow | I have a collection of DataRow objects. I should select distinct rows, based on the column 'URL_Link'. Following [this post][1], I came up with below code.
Is it possible to apply it for DataRow collection?
IEnumerable<DataRow> results = GetData();
results.GroupBy(row => row.Field<string>("URL_Link")).Select(grp => grp.First());
It is syntactically correct, but it does not solve the problem. It doesn't remove duplicate rows. What am I doing wrong?
[1]: http://stackoverflow.com/questions/1300088/distinct-with-lambda | c# | linq | lambda | ienumerable | datarow | null | open | Linq groupby on IEnumerable DataRow
===
I have a collection of DataRow objects. I should select distinct rows, based on the column 'URL_Link'. Following [this post][1], I came up with below code.
Is it possible to apply it for DataRow collection?
IEnumerable<DataRow> results = GetData();
results.GroupBy(row => row.Field<string>("URL_Link")).Select(grp => grp.First());
It is syntactically correct, but it does not solve the problem. It doesn't remove duplicate rows. What am I doing wrong?
[1]: http://stackoverflow.com/questions/1300088/distinct-with-lambda | 0 |
9,126,899 | 02/03/2012 10:10:50 | 1,067,166 | 11/26/2011 18:13:25 | 1 | 0 | Is there existing resources for selling prototypes? | I am looking for your opinion.
As professional developer , I have a stock of applications, preferrably in Java-base Web applications area .
I want to earn money from them, but I dont sure how to sell in traditional way (it means for me, sell as completed apps). Because nature of Web app is very flexible and depends on specific client's requirements.
My idea is : sell well-documented prototypes. For me, it means full functioning app ( f.e. example , web auction, based on Java/Tomcat) with sources and documented (up to reasonable level). Client can use sources and make changes, or learn from it. Its similar to open-source, but not free for client.
My question : is this idea looking for you as valuable and real? Are there known existing resources for sellng prototypes?
Thanks alot | java | tomcat | application | web | prototype | 02/03/2012 10:31:41 | off topic | Is there existing resources for selling prototypes?
===
I am looking for your opinion.
As professional developer , I have a stock of applications, preferrably in Java-base Web applications area .
I want to earn money from them, but I dont sure how to sell in traditional way (it means for me, sell as completed apps). Because nature of Web app is very flexible and depends on specific client's requirements.
My idea is : sell well-documented prototypes. For me, it means full functioning app ( f.e. example , web auction, based on Java/Tomcat) with sources and documented (up to reasonable level). Client can use sources and make changes, or learn from it. Its similar to open-source, but not free for client.
My question : is this idea looking for you as valuable and real? Are there known existing resources for sellng prototypes?
Thanks alot | 2 |
1,536,484 | 10/08/2009 08:44:40 | 87,921 | 04/07/2009 03:37:56 | 114 | 1 | Drupal 6 forms and optgroup arrays | The following array is produced by converting xml to a array (using xml2array). However its not the exactly the right format I need for a optgroup in a Drupal 6 form.
Array (
[root] => Array ([attr] => Array ([id] => 1) [label] => Array ([value] => My Root)
[node] => Array (
[0] => Array ([attr] => Array([id] => 2) [label] => Array([value] => Category 1)
[node] => Array(
[0] => Array ([attr] => Array ([id] => 14) [label] => Array ([value] => Sub-Category 1))
[1] => Array([attr] => Array ([id] => 15) [label] => Array([value] => Sub-Category2))
I think the array has too be reduced to this format with id values intact for the sub-categories. However I can't confirm this with the drupal docs as they don't mention anything about assigning values to a option.
Array (
[Category 1] => Array(
[14] => Sub-Category 1
[15] => Sub-Category 2
)
)
So my questions are 1) is what is the correct array format for Drupal optgroups with my specified values and 2) how do I reduce my array to match? | drupal | php | arrays | null | null | null | open | Drupal 6 forms and optgroup arrays
===
The following array is produced by converting xml to a array (using xml2array). However its not the exactly the right format I need for a optgroup in a Drupal 6 form.
Array (
[root] => Array ([attr] => Array ([id] => 1) [label] => Array ([value] => My Root)
[node] => Array (
[0] => Array ([attr] => Array([id] => 2) [label] => Array([value] => Category 1)
[node] => Array(
[0] => Array ([attr] => Array ([id] => 14) [label] => Array ([value] => Sub-Category 1))
[1] => Array([attr] => Array ([id] => 15) [label] => Array([value] => Sub-Category2))
I think the array has too be reduced to this format with id values intact for the sub-categories. However I can't confirm this with the drupal docs as they don't mention anything about assigning values to a option.
Array (
[Category 1] => Array(
[14] => Sub-Category 1
[15] => Sub-Category 2
)
)
So my questions are 1) is what is the correct array format for Drupal optgroups with my specified values and 2) how do I reduce my array to match? | 0 |
11,534,904 | 07/18/2012 05:40:37 | 1,278,372 | 03/19/2012 10:48:54 | 1 | 0 | How to zoom a jpeg image programatically? |
Hi All,
I would like to be able to zoom (-/+) a **jpeg image** in my project.
I would like to zoom the image when we click on some part on it. How can I achieve this?
In simple words, how can I zoom a **jpeg image** in and out when I click on the image programmatically? The solution may be in **java or html or javascript**. Or if there are any other third party tools to perform the zoom operation on jpeg images please suggest me. Its very urgent requirement for me. Please give me any ideas..
Thanks,
Vidya | java | javascript | jquery | html | null | 07/18/2012 10:06:49 | not a real question | How to zoom a jpeg image programatically?
===
Hi All,
I would like to be able to zoom (-/+) a **jpeg image** in my project.
I would like to zoom the image when we click on some part on it. How can I achieve this?
In simple words, how can I zoom a **jpeg image** in and out when I click on the image programmatically? The solution may be in **java or html or javascript**. Or if there are any other third party tools to perform the zoom operation on jpeg images please suggest me. Its very urgent requirement for me. Please give me any ideas..
Thanks,
Vidya | 1 |
7,134,300 | 08/20/2011 19:58:37 | 898,814 | 08/17/2011 14:19:06 | 1 | 0 | jasper report in Java with NetBeans IDE 6.9.1 | I've download plugins for NetBeans IDE 6.9.1 for making report in Java,
Now how can I do proceed with NetBeans,
Will you reply me ?
Thanking you,
Akash Gajjar (5th Sem/MCA/CICA/CHARUSAT/Education Campus:Changa/District:Anand/Gujarat) | java | null | null | null | null | 08/21/2011 07:49:39 | not a real question | jasper report in Java with NetBeans IDE 6.9.1
===
I've download plugins for NetBeans IDE 6.9.1 for making report in Java,
Now how can I do proceed with NetBeans,
Will you reply me ?
Thanking you,
Akash Gajjar (5th Sem/MCA/CICA/CHARUSAT/Education Campus:Changa/District:Anand/Gujarat) | 1 |
7,887,070 | 10/25/2011 09:11:20 | 1,012,233 | 10/25/2011 06:56:36 | 1 | 0 | Interprating API response from Google server | I am developing a Location based application. application will show route between to locations with turn by turn directions(as in native "Maps" application with all the nodes). I am requesting to google maps for directions in following way.(as example directions between cupertino and stanford)
NSString* apiUrlStr = [NSString stringWithFormat:@"http://maps.google.com/maps?dirflg=d&output=dragdir&saddr=Stanford&daddr=cupertino"];
NSURL* apiUrl = [NSURL URLWithString:apiUrlStr];
NSError* error = nil;
NSString* apiResponse = [NSString stringWithContentsOfURL:apiUrl encoding:NSASCIIStringEncoding error:&error];
NSLog(@"apiResponse=%@", apiResponse);
At the console I got response
`{tooltipHtml:" (12.9\x26#160;mi / 19 mins)",polylines:[{id:"route0",points:"kklcFzishVdBb@??@s@rB{PHi@Xk@??bEmDrDgF~DeHVcAhCgG??rFfEv@RbFHnEa@vBGnEd@\\P~EjGtMxK??zNwTxB_ChCqD??bAt@bDdBvDt@~BXrC@xBS|NiClA@fAPvBdA~@dAlI`Q`AxAr@n@|@d@rFxA|AlA`AnAz@t@l@`@nAd@zQnC??bA\\^XVr@Az@KVa@\\m@B[UWq@?i@zBaI`@oBd@mDt@kS~@kG`AoDrA_DhAqB~AkBlCuBlDiB~Cw@lU}CbBa@~B{@jE_CvAgAjDyDhQ{SvFuFpUgSzD{EdAcB`BiDlA_DfAaEbIk`@r@mERyBZkMXkHX{DjA{GtBaG|CcFxC{CfAy@vUaMjDmEvA}BxCkG`AwCfAyEtCiRv@{ClB_F|B_EpDkEvAoAdGcE|FwEbBmBvBmDhAiCtMma@dAcCrBmD`LiNlB{CfAcCtEaMtKsU`CmEdP{WbB_EbAoDr@}Dd@aFLkCC_FK_C{C}YMqGPsGRyC\\eCdAeFpCaLdBiJXcENgHa@qIcIwo@[_DWeFKk[Dyc@??\\gHbAgI?_@??|bAG???s@_@?",levels:"BBB???BB????BB?@???@??BB??BB???@????@????@??????@BB?????@???@????@???@??????@??????@???@????@?@?????@?????@??????@??@??@?????A???@????@??????@???@?BB??BBBB?B",numLevel`s:4,zoomFactor:16}]}
I am not able understand above response. Does this response contains turn by turn directions? If not how can get these directions? | iphone | driving-directions | null | null | null | null | open | Interprating API response from Google server
===
I am developing a Location based application. application will show route between to locations with turn by turn directions(as in native "Maps" application with all the nodes). I am requesting to google maps for directions in following way.(as example directions between cupertino and stanford)
NSString* apiUrlStr = [NSString stringWithFormat:@"http://maps.google.com/maps?dirflg=d&output=dragdir&saddr=Stanford&daddr=cupertino"];
NSURL* apiUrl = [NSURL URLWithString:apiUrlStr];
NSError* error = nil;
NSString* apiResponse = [NSString stringWithContentsOfURL:apiUrl encoding:NSASCIIStringEncoding error:&error];
NSLog(@"apiResponse=%@", apiResponse);
At the console I got response
`{tooltipHtml:" (12.9\x26#160;mi / 19 mins)",polylines:[{id:"route0",points:"kklcFzishVdBb@??@s@rB{PHi@Xk@??bEmDrDgF~DeHVcAhCgG??rFfEv@RbFHnEa@vBGnEd@\\P~EjGtMxK??zNwTxB_ChCqD??bAt@bDdBvDt@~BXrC@xBS|NiClA@fAPvBdA~@dAlI`Q`AxAr@n@|@d@rFxA|AlA`AnAz@t@l@`@nAd@zQnC??bA\\^XVr@Az@KVa@\\m@B[UWq@?i@zBaI`@oBd@mDt@kS~@kG`AoDrA_DhAqB~AkBlCuBlDiB~Cw@lU}CbBa@~B{@jE_CvAgAjDyDhQ{SvFuFpUgSzD{EdAcB`BiDlA_DfAaEbIk`@r@mERyBZkMXkHX{DjA{GtBaG|CcFxC{CfAy@vUaMjDmEvA}BxCkG`AwCfAyEtCiRv@{ClB_F|B_EpDkEvAoAdGcE|FwEbBmBvBmDhAiCtMma@dAcCrBmD`LiNlB{CfAcCtEaMtKsU`CmEdP{WbB_EbAoDr@}Dd@aFLkCC_FK_C{C}YMqGPsGRyC\\eCdAeFpCaLdBiJXcENgHa@qIcIwo@[_DWeFKk[Dyc@??\\gHbAgI?_@??|bAG???s@_@?",levels:"BBB???BB????BB?@???@??BB??BB???@????@????@??????@BB?????@???@????@???@??????@??????@???@????@?@?????@?????@??????@??@??@?????A???@????@??????@???@?BB??BBBB?B",numLevel`s:4,zoomFactor:16}]}
I am not able understand above response. Does this response contains turn by turn directions? If not how can get these directions? | 0 |
11,031,708 | 06/14/2012 11:02:13 | 1,360,434 | 04/27/2012 06:41:35 | 6 | 0 | c# brace conundrum | Orchard CMS software doesn’t cease to amaze me. I see funky code as follows:
DoMethod247();
{
DoMethod82();
DoMethod359();
{
DoMethodA();
{
DoMethodM()
}
}
}
Can anybody explain what the good of curly braces is?
| c#-4.0 | null | null | null | null | 06/18/2012 12:11:03 | not a real question | c# brace conundrum
===
Orchard CMS software doesn’t cease to amaze me. I see funky code as follows:
DoMethod247();
{
DoMethod82();
DoMethod359();
{
DoMethodA();
{
DoMethodM()
}
}
}
Can anybody explain what the good of curly braces is?
| 1 |
9,359,433 | 02/20/2012 10:14:24 | 1,220,732 | 02/20/2012 10:07:25 | 1 | 0 | Best way to grab and print data from a large amount of text fields? | I'm trying to figure out the best way to read data from around 60 text fields and then print it in a spaced line.
For example
System.out.println(field1.getText() + " " + field2.getText());
The thing is, I don't want to have a crap load of getText() method.
So my main question is, is there an easier and perhaps better (performance-wise) way to do this?
Image:
[my text fields](http://screensnapr.com/e/lEsgEZ.png)
| java | jtextfield | null | null | null | null | open | Best way to grab and print data from a large amount of text fields?
===
I'm trying to figure out the best way to read data from around 60 text fields and then print it in a spaced line.
For example
System.out.println(field1.getText() + " " + field2.getText());
The thing is, I don't want to have a crap load of getText() method.
So my main question is, is there an easier and perhaps better (performance-wise) way to do this?
Image:
[my text fields](http://screensnapr.com/e/lEsgEZ.png)
| 0 |
10,579,042 | 05/14/2012 07:22:34 | 1,251,377 | 03/06/2012 05:18:16 | 14 | 0 | How to load entirely different ViewController in a Master-Detail app? | I have a Master-Detail app and I want to load a new view on the click of rows in Master. If I select row-1, the view is different, and on selection of a different row, new view is presented in Detail portion. How can I achieve this thing? | ios | xcode | ipad | ios5 | null | null | open | How to load entirely different ViewController in a Master-Detail app?
===
I have a Master-Detail app and I want to load a new view on the click of rows in Master. If I select row-1, the view is different, and on selection of a different row, new view is presented in Detail portion. How can I achieve this thing? | 0 |
7,194,862 | 08/25/2011 17:46:21 | 9,604 | 09/15/2008 19:19:07 | 2,643 | 126 | Best Place To Populate ViewModels For Partials? | Currently I am using a ViewModelFactory hanging off HtmlHelper in an extension method:
public static IViewModelFactory ViewModels(this HtmlHelper helper)
{
var factory = DependencyResolver.Current.GetService<IViewModelFactory>();
return factory;
}
And then an example view with partial:
@model WidgetViewModel
<fieldset>
@using (Html.BeginForm())
{
@Html.Partial("_Form.cshtml", Html.ViewModels().EventForm() )
}
</fieldset>
Is this a bad idea? It feels dirty. If so, where/how is the testable best practice to populate/build ViewModels for my Partials? | asp.net-mvc | viewmodel | null | null | null | null | open | Best Place To Populate ViewModels For Partials?
===
Currently I am using a ViewModelFactory hanging off HtmlHelper in an extension method:
public static IViewModelFactory ViewModels(this HtmlHelper helper)
{
var factory = DependencyResolver.Current.GetService<IViewModelFactory>();
return factory;
}
And then an example view with partial:
@model WidgetViewModel
<fieldset>
@using (Html.BeginForm())
{
@Html.Partial("_Form.cshtml", Html.ViewModels().EventForm() )
}
</fieldset>
Is this a bad idea? It feels dirty. If so, where/how is the testable best practice to populate/build ViewModels for my Partials? | 0 |
7,918,396 | 10/27/2011 15:32:20 | 1,016,788 | 10/27/2011 15:21:53 | 1 | 0 | How to mix apparently incompatible paradigms: OOP and FP? | Reading back some of my Scala code, I noticed that it is either functional or object oriented.
Indeed, I have no idea on how to conciliate the no-side effects rule implied by immutable types and pure functions and the premise of OO, where methods modify instance state in-place, which is obviously side-effects.
One solution I am investigating is to make all methods return a clone of the current instance with the appropriate state modifications. Seems eager, but might help when I'll decide to paralelize the code, right ?
What are the best practices on mixing those 2 paradigms ? What is the balance ?
Thanks. | oop | scala | coding-style | functional-programming | programming-paradigms | 10/28/2011 14:26:54 | not constructive | How to mix apparently incompatible paradigms: OOP and FP?
===
Reading back some of my Scala code, I noticed that it is either functional or object oriented.
Indeed, I have no idea on how to conciliate the no-side effects rule implied by immutable types and pure functions and the premise of OO, where methods modify instance state in-place, which is obviously side-effects.
One solution I am investigating is to make all methods return a clone of the current instance with the appropriate state modifications. Seems eager, but might help when I'll decide to paralelize the code, right ?
What are the best practices on mixing those 2 paradigms ? What is the balance ?
Thanks. | 4 |
101,974 | 09/19/2008 13:52:02 | 7,595 | 09/15/2008 14:01:51 | 1 | 0 | .Net Assembly Hell | I am Trying to develop a .Net Web Project using NHibernate and Spring.net. But I'm stuck.
Spring.net seems to depend on different versions of the NHibernate assemblies (maybe it needs 1.2.1.4000 and my NHibernate version is 1.2.0.4000).
I solved some problems with the "bindingRedirect" TAG, but now even that stopped working.
My Question is:
Is there any way to do this in a simple way to resolve this inter-library relations? | .net | nhibernate | assembly | spring.net | null | 09/26/2008 18:19:33 | off topic | .Net Assembly Hell
===
I am Trying to develop a .Net Web Project using NHibernate and Spring.net. But I'm stuck.
Spring.net seems to depend on different versions of the NHibernate assemblies (maybe it needs 1.2.1.4000 and my NHibernate version is 1.2.0.4000).
I solved some problems with the "bindingRedirect" TAG, but now even that stopped working.
My Question is:
Is there any way to do this in a simple way to resolve this inter-library relations? | 2 |
4,749,742 | 01/20/2011 16:28:15 | 271,087 | 02/11/2010 13:18:40 | 1,782 | 104 | EU Data Protection Legislation and storing data in a US located server | SETUP:
------
We are UK based web developers and the majority of our clients are in the EU.
We rent a cloud server from a company in the US (orcsweb.com). This cloud server hosts all the websites we develop plus any databases these websites use.
As a result, a lot of EU based people are loading their data into these websites, with said data being stored outside of the EU. As I understand it, this goes against EU Data Protection legislation.
This is obviously a major issue for us, as to change servers would be a nightmare.
Orcsweb.com are complying with the regulations in force in the US and, in fact, take extra precautions with data security. They pointed out that however secure they are with the data, it is ultimately the responsability of the website to comply with the EU regulations, as these are more concerned with how the data is treated and used, than with any specific data security issue.
This is supported by the details, as I understand them, of the Safe Harbor Scheme.
*[Note: The Safe Harbor Scheme was negotiated between the US and the EU as a way of letting the likes of me and Facebook get on with their jobs]*
According to my understanding, if the websites comply with the Safe Harbor requirements, then we are ok, ie, in compliance with the EU Data Protection legislation.
Safe Harbor involves complying with 7 basic principles:
SAFE HARBOR 7 BASIC PRINCIPLES:
-------------------------------
1. Notify Internet users about the type of data collected at the Web site, the manner in which it is collected, for what purpose, and whether it will be disclosed to third parties. They must also inform users of options for limiting the use and disclosure of that information.
2. Provide individuals with the chance to opt out of having their personal data collected or disseminated to third parties.
3. Guarantee that data will be transferred only to other Safe-Harbor compliant parties.
4. Facilitate individuals' access to their personal data and provide a means for them to correct inaccurate information.
5. Undertake "reasonable precautions" to secure the data from loss, alteration, or unauthorized access or disclosure.
6. Utilize the data only for purposes that have been disclosed to the individuals.
7. Put in place enforcement mechanisms that will ensure compliance. These include providing accessible, affordable, and independent venues through which individuals can lodge complaints for breach of Safe Harbor principles and through which justifiable damages can be awarded, and a system to verify that the company has in fact implemented the Safe Harbor principles.
THE QUESTIONS:
--------------
1. Does anyone know any better?
2. Can you find fault with my reasoning and understanding of the legislation?
A few more details provided below to put our problem in context. I have used one of the websites to give a concrete example.
---------------------------------
THE CONTEXT:
------------
1. A medical charity collects data from users using forms exposed on their website.
2. Some of these users may become members of the Charity, others will simply fill in forms with details of their illness to build up a database for research.
3. The above is obviously highly sensitive personal data.
4. Currently, the only personal contact data that gets stored in the online database is the user's email and optionally, the user's name.
5. The information stored in the online database is not available unless the user is correctly logged into the site.
6. A user cannot see the data relating to another user, EXCEPT by users who have been explicitly granted admin rights over the data. All admin users are either staff members or trusted web development consultants of the Charity.
7. At the point of collecting the data, it is made quite clear to the user what the data will be used for, that it will not be sent to third parties, etc.
THE PURPOSE FOR COLLECTING THE DATA:
------------------------------------
a. To build up statistical information on the Syndrome that the Charity is concerned with.
b. This information may potentially be used as a source for Research into the Syndrome.
c. All data that is handed over for research will be fully anonymised. Ie, there will be no personal contact data included in the data sets that are made available for research.
THE PROBLEM:
------------
i. The problem is that the servers that hold this data are located outside the EU, in the US, as are the websites that display this data.
ii. This raises an issue with EU Data Protection legislation.
iii. I understand that EU Data Protection legislation does not consider the US to be safe for hosting data as it does not have the kind of legislation required by the EU:
"Article 25 of the EU Directive prohibits any EU country from transferring personal data via the Internet to, or receiving data from, countries deemed to lack "adequate" Internet privacy protection. The U.S. is among those countries, since it has no national data-privacy laws that meet the EU standards. Instead of laws, the U.S. government permitted American companies to address privacy issues through self-regulation, which many EU officials regard as too lax to adequately safeguard individuals who use the Web."
Quoted from: [Safe Harbor Privacy Framework - Data, Principles, Companies, Protection, Program, and Directive][1]
THE SAFE HARBOR SCHEME - THE SOLUTION?:
To get around the problem, the EU and the US have agreed on the Safe Harbor Scheme. This is an agreement between the US and the EU (more precisely, the EEA) that allows companies to move forwards within the constraints of the law.
If we comply with the 7 basic principles, detailed above, are we in violation of the EU Data Protection legislation?
[1]: http://ecommerce.hostip.info/pages/915/Safe-Harbor-Privacy-Framework.html#ixzz1BZkJ87qI | legal | privacy | data-protection | null | null | 01/24/2011 19:02:15 | off topic | EU Data Protection Legislation and storing data in a US located server
===
SETUP:
------
We are UK based web developers and the majority of our clients are in the EU.
We rent a cloud server from a company in the US (orcsweb.com). This cloud server hosts all the websites we develop plus any databases these websites use.
As a result, a lot of EU based people are loading their data into these websites, with said data being stored outside of the EU. As I understand it, this goes against EU Data Protection legislation.
This is obviously a major issue for us, as to change servers would be a nightmare.
Orcsweb.com are complying with the regulations in force in the US and, in fact, take extra precautions with data security. They pointed out that however secure they are with the data, it is ultimately the responsability of the website to comply with the EU regulations, as these are more concerned with how the data is treated and used, than with any specific data security issue.
This is supported by the details, as I understand them, of the Safe Harbor Scheme.
*[Note: The Safe Harbor Scheme was negotiated between the US and the EU as a way of letting the likes of me and Facebook get on with their jobs]*
According to my understanding, if the websites comply with the Safe Harbor requirements, then we are ok, ie, in compliance with the EU Data Protection legislation.
Safe Harbor involves complying with 7 basic principles:
SAFE HARBOR 7 BASIC PRINCIPLES:
-------------------------------
1. Notify Internet users about the type of data collected at the Web site, the manner in which it is collected, for what purpose, and whether it will be disclosed to third parties. They must also inform users of options for limiting the use and disclosure of that information.
2. Provide individuals with the chance to opt out of having their personal data collected or disseminated to third parties.
3. Guarantee that data will be transferred only to other Safe-Harbor compliant parties.
4. Facilitate individuals' access to their personal data and provide a means for them to correct inaccurate information.
5. Undertake "reasonable precautions" to secure the data from loss, alteration, or unauthorized access or disclosure.
6. Utilize the data only for purposes that have been disclosed to the individuals.
7. Put in place enforcement mechanisms that will ensure compliance. These include providing accessible, affordable, and independent venues through which individuals can lodge complaints for breach of Safe Harbor principles and through which justifiable damages can be awarded, and a system to verify that the company has in fact implemented the Safe Harbor principles.
THE QUESTIONS:
--------------
1. Does anyone know any better?
2. Can you find fault with my reasoning and understanding of the legislation?
A few more details provided below to put our problem in context. I have used one of the websites to give a concrete example.
---------------------------------
THE CONTEXT:
------------
1. A medical charity collects data from users using forms exposed on their website.
2. Some of these users may become members of the Charity, others will simply fill in forms with details of their illness to build up a database for research.
3. The above is obviously highly sensitive personal data.
4. Currently, the only personal contact data that gets stored in the online database is the user's email and optionally, the user's name.
5. The information stored in the online database is not available unless the user is correctly logged into the site.
6. A user cannot see the data relating to another user, EXCEPT by users who have been explicitly granted admin rights over the data. All admin users are either staff members or trusted web development consultants of the Charity.
7. At the point of collecting the data, it is made quite clear to the user what the data will be used for, that it will not be sent to third parties, etc.
THE PURPOSE FOR COLLECTING THE DATA:
------------------------------------
a. To build up statistical information on the Syndrome that the Charity is concerned with.
b. This information may potentially be used as a source for Research into the Syndrome.
c. All data that is handed over for research will be fully anonymised. Ie, there will be no personal contact data included in the data sets that are made available for research.
THE PROBLEM:
------------
i. The problem is that the servers that hold this data are located outside the EU, in the US, as are the websites that display this data.
ii. This raises an issue with EU Data Protection legislation.
iii. I understand that EU Data Protection legislation does not consider the US to be safe for hosting data as it does not have the kind of legislation required by the EU:
"Article 25 of the EU Directive prohibits any EU country from transferring personal data via the Internet to, or receiving data from, countries deemed to lack "adequate" Internet privacy protection. The U.S. is among those countries, since it has no national data-privacy laws that meet the EU standards. Instead of laws, the U.S. government permitted American companies to address privacy issues through self-regulation, which many EU officials regard as too lax to adequately safeguard individuals who use the Web."
Quoted from: [Safe Harbor Privacy Framework - Data, Principles, Companies, Protection, Program, and Directive][1]
THE SAFE HARBOR SCHEME - THE SOLUTION?:
To get around the problem, the EU and the US have agreed on the Safe Harbor Scheme. This is an agreement between the US and the EU (more precisely, the EEA) that allows companies to move forwards within the constraints of the law.
If we comply with the 7 basic principles, detailed above, are we in violation of the EU Data Protection legislation?
[1]: http://ecommerce.hostip.info/pages/915/Safe-Harbor-Privacy-Framework.html#ixzz1BZkJ87qI | 2 |
4,928,852 | 02/08/2011 01:55:17 | 607,405 | 02/08/2011 01:09:38 | 16 | 2 | Keeping the TreeView and the Nodes seperate | I have a problem concerning good application design that has been keeping me up for days now. One can describe it as:
- I have a tree structure made up of Nodes holding references to their children.
- I would now like to display that structure in a TreeView (I am the one who will implement the TreeView).
- I don't want the Nodes to 'know' that there is a TreeView, enabling me to keep those two components separate.
So where do I store the information whether an node is expanded or not (this information is not part of the Node itself).
Any idea on how to implement this in a clean way?
Thanks
Konne | design-patterns | null | null | null | null | null | open | Keeping the TreeView and the Nodes seperate
===
I have a problem concerning good application design that has been keeping me up for days now. One can describe it as:
- I have a tree structure made up of Nodes holding references to their children.
- I would now like to display that structure in a TreeView (I am the one who will implement the TreeView).
- I don't want the Nodes to 'know' that there is a TreeView, enabling me to keep those two components separate.
So where do I store the information whether an node is expanded or not (this information is not part of the Node itself).
Any idea on how to implement this in a clean way?
Thanks
Konne | 0 |
10,274,425 | 04/23/2012 03:21:19 | 764,135 | 05/21/2011 16:16:58 | 16 | 0 | changing the Geo-Location permission notification text in iOS | Many iOS apps which use geo-location pop up a permission-based notitifcation stating:
"X app would like to use your location. Confirm it's OK" and the user may confirm or not to turn this ON or leave it OFF.
How can you adjust the text inside this notification? (in xCode)
I sincerely appreciate any insights | iphone | objective-c | ios | xcode | apns | null | open | changing the Geo-Location permission notification text in iOS
===
Many iOS apps which use geo-location pop up a permission-based notitifcation stating:
"X app would like to use your location. Confirm it's OK" and the user may confirm or not to turn this ON or leave it OFF.
How can you adjust the text inside this notification? (in xCode)
I sincerely appreciate any insights | 0 |
9,376,378 | 02/21/2012 11:01:04 | 1,199,233 | 02/09/2012 09:08:46 | 1 | 0 | Some problems about the mexLasso function | I am a student who is envolving in a research about robust visual tracking.
And these days ,I had met a problem in my study.
The teacher gave me a project of matlab code about the research, when I try to run this code, and the program error is as follows:
??? Attempt to execute SCRIPT mexLasso as a function:
F:\L1_Tracking_standard_car\mexLasso.m
Error in ==> L1Tracking_release at 95
c = mexLasso(Y(:,i), [A fixT], param);
Error in ==> demo at 46
tracking_res = L1Tracking_release( s_frames, sz_T, n_sample, init_pos,
res_path, fcdatapts);
When I go to the program tracking, I found that mexLasso function does not exist, Only get an empty mexLasso.m file and a mexLasso.mexw32 files.
My OS version is Windows 7 64bit,and the matlab is matlab 7.12.0 r2011a
Does anybody here knows the causes of my problem?
Anymore, I wonder if anybody knows who has the source code of the binary file mexLasso.mexw32.Because I thought that if I can get the source code of the file mexLasso.mexw32,then I could compile its 64 bit version myself.(I doubt that my os could not recognize the .mexw32 file.)
| matlab | robust | null | null | null | null | open | Some problems about the mexLasso function
===
I am a student who is envolving in a research about robust visual tracking.
And these days ,I had met a problem in my study.
The teacher gave me a project of matlab code about the research, when I try to run this code, and the program error is as follows:
??? Attempt to execute SCRIPT mexLasso as a function:
F:\L1_Tracking_standard_car\mexLasso.m
Error in ==> L1Tracking_release at 95
c = mexLasso(Y(:,i), [A fixT], param);
Error in ==> demo at 46
tracking_res = L1Tracking_release( s_frames, sz_T, n_sample, init_pos,
res_path, fcdatapts);
When I go to the program tracking, I found that mexLasso function does not exist, Only get an empty mexLasso.m file and a mexLasso.mexw32 files.
My OS version is Windows 7 64bit,and the matlab is matlab 7.12.0 r2011a
Does anybody here knows the causes of my problem?
Anymore, I wonder if anybody knows who has the source code of the binary file mexLasso.mexw32.Because I thought that if I can get the source code of the file mexLasso.mexw32,then I could compile its 64 bit version myself.(I doubt that my os could not recognize the .mexw32 file.)
| 0 |
7,131,703 | 08/20/2011 12:18:51 | 283,055 | 05/11/2009 14:24:50 | 4,260 | 84 | How to know which branch a "git log" commit belongs to? | If I do `git log`, is there any parameter I could specify to be able to tell from the output which branch every commit belongs to? | git | null | null | null | null | null | open | How to know which branch a "git log" commit belongs to?
===
If I do `git log`, is there any parameter I could specify to be able to tell from the output which branch every commit belongs to? | 0 |
2,524,930 | 03/26/2010 16:32:28 | 97,767 | 04/29/2009 15:31:45 | 242 | 11 | jQuery: attr('height') undefined | I have a container div with the following CSS:
#container {
position:relative;
overflow:hidden;
width:200px;
height:200px;
}
Why does this:
alert('height is ' + $("#container").attr('height'));
Return that height is undefined?
Thanks,
JG | jquery | css | null | null | null | null | open | jQuery: attr('height') undefined
===
I have a container div with the following CSS:
#container {
position:relative;
overflow:hidden;
width:200px;
height:200px;
}
Why does this:
alert('height is ' + $("#container").attr('height'));
Return that height is undefined?
Thanks,
JG | 0 |
10,432,202 | 05/03/2012 13:16:20 | 1,046,428 | 11/14/2011 21:37:56 | 42 | 0 | Output function results to a vector | I have created a function to call a function on each row in a dataset. I would like to have the output as a vector. As you can see below the function outputs the results to the screen, but I cannot figure out how to redirect the output to a vector that I can use outside the function.
n_markers <- nrow(data)
p_values <-rep(0, n_markers)
test_markers <- function()
{
for (i in 1:n_markers)
{
hets <- data[i, 2]
hom_1 <- data[i, 3]
hom_2 <- data[i, 4]
p_values[i] <- SNPHWE(hets, hom_1, hom_2)
}
return(p_values)
}
test_markers() | r | function | vector | output | null | null | open | Output function results to a vector
===
I have created a function to call a function on each row in a dataset. I would like to have the output as a vector. As you can see below the function outputs the results to the screen, but I cannot figure out how to redirect the output to a vector that I can use outside the function.
n_markers <- nrow(data)
p_values <-rep(0, n_markers)
test_markers <- function()
{
for (i in 1:n_markers)
{
hets <- data[i, 2]
hom_1 <- data[i, 3]
hom_2 <- data[i, 4]
p_values[i] <- SNPHWE(hets, hom_1, hom_2)
}
return(p_values)
}
test_markers() | 0 |
3,245,840 | 07/14/2010 12:03:18 | 391,519 | 07/14/2010 12:03:18 | 1 | 0 | how to pass cursor as IN parameter to a stored procedure | I want to pass a cursor to a stored procedure as IN parameter from my xyz.java file.
I am using spring and hibernate.
Can you help me with this.
Needed urgently.Reply soon.
And if cannot pass then can you help with some alernative.
Thankyou. | hibernate | spring | stored-procedures | null | null | null | open | how to pass cursor as IN parameter to a stored procedure
===
I want to pass a cursor to a stored procedure as IN parameter from my xyz.java file.
I am using spring and hibernate.
Can you help me with this.
Needed urgently.Reply soon.
And if cannot pass then can you help with some alernative.
Thankyou. | 0 |
9,006,615 | 01/25/2012 16:53:52 | 1,147,455 | 01/13/2012 10:12:03 | 40 | 4 | Are there any good documentations / books / tutorials for xUnit.NET? | On my search for a Unit-Testing tool for C# i have found xUnit.NET. Untill now, i read most of the articles on [http://xunit.codeplex.com/][1] and even tried out the examples given at [How do I use xUnit.net?][2].
But sadly, on the offical page i could just find the basic informations to xUnit.NET. Is there any further information avadible for it?
Thank you!
Birgit
[1]: http://xunit.codeplex.com//
[2]: http://xunit.codeplex.com/wikipage?title=HowToUse&referringTitle=Home | c# | unit-testing | xunit.net | null | null | 02/09/2012 14:07:39 | not constructive | Are there any good documentations / books / tutorials for xUnit.NET?
===
On my search for a Unit-Testing tool for C# i have found xUnit.NET. Untill now, i read most of the articles on [http://xunit.codeplex.com/][1] and even tried out the examples given at [How do I use xUnit.net?][2].
But sadly, on the offical page i could just find the basic informations to xUnit.NET. Is there any further information avadible for it?
Thank you!
Birgit
[1]: http://xunit.codeplex.com//
[2]: http://xunit.codeplex.com/wikipage?title=HowToUse&referringTitle=Home | 4 |
11,714,429 | 07/30/2012 01:23:46 | 792,135 | 06/10/2011 05:01:41 | 10 | 0 | How would a sprite spawn more sprites under themself every second? | I am making a snake game and am having trouble to make the snake go longer, at the moment when I run the program, I just have the snake head eating apples. But I want the snake head(30x30) to spawn body parts(20x20) under himself every second. After I can do that, the snake head has to draw 4 body parts and the computer must "delete" the oldest body part before a new one spawns. It is a 2d game, and the snake can curve instead of 90 degree turns. I hope you will all understand. | c# | xna | game-engine | movement | null | 07/31/2012 02:28:42 | off topic | How would a sprite spawn more sprites under themself every second?
===
I am making a snake game and am having trouble to make the snake go longer, at the moment when I run the program, I just have the snake head eating apples. But I want the snake head(30x30) to spawn body parts(20x20) under himself every second. After I can do that, the snake head has to draw 4 body parts and the computer must "delete" the oldest body part before a new one spawns. It is a 2d game, and the snake can curve instead of 90 degree turns. I hope you will all understand. | 2 |
5,492,596 | 03/30/2011 21:22:20 | 257,705 | 01/24/2010 06:28:02 | 822 | 29 | load xx.com on 127.0.0.1 LAMP Server | I want to load websites like xx.com on localhost. I do not want to load it as localhost/xx.com or localhost/xx
Did a change int he apace2.conf
<VirtualHost>
ServerName 127.0.0.1
ServerAlias xx.com www.xx.com
DocumentRoot /var/www/xx.com
</VirtualHost>
How do I do the above.
Thanks
Jean | linux | apache | httpd | httpd.conf | null | 03/31/2011 13:03:53 | off topic | load xx.com on 127.0.0.1 LAMP Server
===
I want to load websites like xx.com on localhost. I do not want to load it as localhost/xx.com or localhost/xx
Did a change int he apace2.conf
<VirtualHost>
ServerName 127.0.0.1
ServerAlias xx.com www.xx.com
DocumentRoot /var/www/xx.com
</VirtualHost>
How do I do the above.
Thanks
Jean | 2 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.