PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
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
32
30.1k
OpenStatus_id
int64
0
4
11,319,288
07/03/2012 21:14:14
1,484,010
06/26/2012 21:26:13
6
0
Jquery slider working but blocky and doesnt always fully open
im having trouble with my jquery slider. when i hover over my img my hiddin content slides out fine but it seems a bit blocky. it will slide down a quarter or so and then jump strait to the end. and if i hover over my img a few times my hiddin content does not slide down all the way. Iv been lost trying to solve this problem for a while any help/suggestions would be appriaciated, thanks in advance. $(document).ready(function() { $(".orchard").hover(function() { $(this).children(".info").stop(true,false).slideToggle(400); }, function() { $(this).children(".info").stop(true,false).slideToggle(400); }); }); <div class="orchard"> <img src="orchard2.jpg" width="300px" height="249" /> <div class="info">my info is here </div> </div>
jquery
null
null
null
null
null
open
Jquery slider working but blocky and doesnt always fully open === im having trouble with my jquery slider. when i hover over my img my hiddin content slides out fine but it seems a bit blocky. it will slide down a quarter or so and then jump strait to the end. and if i hover over my img a few times my hiddin content does not slide down all the way. Iv been lost trying to solve this problem for a while any help/suggestions would be appriaciated, thanks in advance. $(document).ready(function() { $(".orchard").hover(function() { $(this).children(".info").stop(true,false).slideToggle(400); }, function() { $(this).children(".info").stop(true,false).slideToggle(400); }); }); <div class="orchard"> <img src="orchard2.jpg" width="300px" height="249" /> <div class="info">my info is here </div> </div>
0
11,308,741
07/03/2012 10:13:02
1,176,298
01/29/2012 09:51:27
1
5
Disable hyperthreading on intel n550
I've got an 1015PN (an asus netbook) that runs on an intel N550 (with Windows 7 Ultimate). This cpu has 2 cores @ 1.5Ghz, but they're hyperthreaded so in fact I've got 4 virtual cores @ 750Mhz. And in power saving mode, the cores are underclocked at 1.0Ghz, so I've got 4 virtual cores @500Mhz. Omagad, It remembers me my computer ten years ago. It's a pain on single threaded applications (Microsoft Office 2010 for exemple. Yes, it's a shame). As hyperthreading is creating "virtual" cores, is it possible to disable them, or are they hardware implemented ? PS : cant's disable hyperthreading in the bios as it's a low end product.
windows
hyperthreading
netbook
null
null
07/03/2012 10:32:41
off topic
Disable hyperthreading on intel n550 === I've got an 1015PN (an asus netbook) that runs on an intel N550 (with Windows 7 Ultimate). This cpu has 2 cores @ 1.5Ghz, but they're hyperthreaded so in fact I've got 4 virtual cores @ 750Mhz. And in power saving mode, the cores are underclocked at 1.0Ghz, so I've got 4 virtual cores @500Mhz. Omagad, It remembers me my computer ten years ago. It's a pain on single threaded applications (Microsoft Office 2010 for exemple. Yes, it's a shame). As hyperthreading is creating "virtual" cores, is it possible to disable them, or are they hardware implemented ? PS : cant's disable hyperthreading in the bios as it's a low end product.
2
11,308,743
07/03/2012 10:13:03
964,408
09/26/2011 05:12:09
16
2
store an associative array in a file
I am coding a module for drupal. In that I have a large associative array which has key as 'string' and values as 'floats' . eg. $array = array('hello' => 122.23, 'name' => 334.3 ....) I was thinking of storing it in the database by serializing it.. but the array size is dynamic, so I thought of storing it in a file to reduce access time.. What api functions should I use in my .module to create the file, write content and read the array from the file ?
drupal
drupal-7
drupal-modules
null
null
07/03/2012 13:06:16
off topic
store an associative array in a file === I am coding a module for drupal. In that I have a large associative array which has key as 'string' and values as 'floats' . eg. $array = array('hello' => 122.23, 'name' => 334.3 ....) I was thinking of storing it in the database by serializing it.. but the array size is dynamic, so I thought of storing it in a file to reduce access time.. What api functions should I use in my .module to create the file, write content and read the array from the file ?
2
11,319,290
07/03/2012 21:14:28
1,236,423
02/27/2012 20:09:22
15
0
Can I execute a dynamic sql statement in an after update trigger?
I am using the following statement: query_str='SELECT :NEW.FIRST_NAME||:NEW.LAST_NAME INTO HostID FROM INPUT_TABLE WHERE INPUT_ID=' The trigger has the following code: EXECUTE IMMEDIATE query_str ||:NEW.INPUT_ID; I'm getting the following error when updating INPUT_TABLE: ORA-01008: not all variables bound If I'm updating a record where input_id=111, I would think Oracle would just execute the following statement: SELECT :NEW.FIRST_NAME||:NEW.LAST_NAME INTO HostID FROM INPUT_TABLE WHERE INPUT_ID=111 Why is it having binding issues? I'm using SQLDeveloper.
oracle
plsql
triggers
dynamic-sql
null
null
open
Can I execute a dynamic sql statement in an after update trigger? === I am using the following statement: query_str='SELECT :NEW.FIRST_NAME||:NEW.LAST_NAME INTO HostID FROM INPUT_TABLE WHERE INPUT_ID=' The trigger has the following code: EXECUTE IMMEDIATE query_str ||:NEW.INPUT_ID; I'm getting the following error when updating INPUT_TABLE: ORA-01008: not all variables bound If I'm updating a record where input_id=111, I would think Oracle would just execute the following statement: SELECT :NEW.FIRST_NAME||:NEW.LAST_NAME INTO HostID FROM INPUT_TABLE WHERE INPUT_ID=111 Why is it having binding issues? I'm using SQLDeveloper.
0
11,319,302
07/03/2012 21:15:03
1,499,991
07/03/2012 21:10:26
1
0
Umbraco on Godaddy windows shared hosting
I have a godaddy windows shared hosting. I want to use umbraco CMS on my hosting, i looked over some forums about that which says that it is not possible. I want to know that is it possible or anyone have done/tried that. Seems like there is something to do with application trust. Thanks Sachin
asp.net
website
hosting
umbraco
godaddy
null
open
Umbraco on Godaddy windows shared hosting === I have a godaddy windows shared hosting. I want to use umbraco CMS on my hosting, i looked over some forums about that which says that it is not possible. I want to know that is it possible or anyone have done/tried that. Seems like there is something to do with application trust. Thanks Sachin
0
11,319,303
07/03/2012 21:15:08
960,026
09/22/2011 21:19:42
302
12
Calling back to a main file from a dofile in lua
Say i have two files: One is called mainFile.lua: function altDoFile(name) dofile(debug.getinfo(1).source:sub(debug.getinfo(1).source:find(".*\\")):sub(2)..name) end altDoFile("libs/caller.lua") function callBack() print "called back" end doCallback() The other called caller.lua, located in a libs folder: function doCallback() print "performing call back" _G["callBack"]() end The output of running the first file is then: "performing call back" Then nothing more, i'm missing a line! Why is callBack never getting executed? is this intended behavior, and how do i get around it? The fact that the function is getting called from string is important, so that can't be changed.
lua
null
null
null
null
null
open
Calling back to a main file from a dofile in lua === Say i have two files: One is called mainFile.lua: function altDoFile(name) dofile(debug.getinfo(1).source:sub(debug.getinfo(1).source:find(".*\\")):sub(2)..name) end altDoFile("libs/caller.lua") function callBack() print "called back" end doCallback() The other called caller.lua, located in a libs folder: function doCallback() print "performing call back" _G["callBack"]() end The output of running the first file is then: "performing call back" Then nothing more, i'm missing a line! Why is callBack never getting executed? is this intended behavior, and how do i get around it? The fact that the function is getting called from string is important, so that can't be changed.
0
11,319,307
07/03/2012 21:15:32
1,499,955
07/03/2012 20:53:02
1
0
Does the Twitter widget inject some weird code in that affects everything in the DOM? Notably :hover in iOS
I have just come across a weird CSS quirk that goes far beyond my understanding and would appreciate some help: I was trying to build a fancy pure css dropdown solution using the clickable event method Ryan Collins proposed: http://www.ryancollins.me/?p=1041 With :active and :hover and some nested divs we may make trigger spans (or divs or whatever) that cause a sister element in the same container to appear upon mouse click. The example on Ryans page worked on my ipad so I assumed that iOS was smart enough to handle a touch event as triggering the :active state - and if the trigger contains a hyperlink this works, but there is no way to deactivate the active state of a hyperlink, safe for clicking on another hyperlink. This sucks, because my plan to have an elegant navigation (and some other stuff) pop up and hide from view with just css is foiled, the menu never collapses - but then why does the example on Ryan's page work? I did some testing and finally narrowed the key element down to a twitter widget he has embedded on his page. Some javascript styles the embedded tweet and in doing so, it affects the very :active and : hover solution that all of a sudden works via touch on iOS, even without hyperlinks. Can anybody tell me what causes this behavior and if I could emulate it without relying on a crazy hack like embedding a twitter widget and hiding it from view?
css
ios
twitter
bugs
null
null
open
Does the Twitter widget inject some weird code in that affects everything in the DOM? Notably :hover in iOS === I have just come across a weird CSS quirk that goes far beyond my understanding and would appreciate some help: I was trying to build a fancy pure css dropdown solution using the clickable event method Ryan Collins proposed: http://www.ryancollins.me/?p=1041 With :active and :hover and some nested divs we may make trigger spans (or divs or whatever) that cause a sister element in the same container to appear upon mouse click. The example on Ryans page worked on my ipad so I assumed that iOS was smart enough to handle a touch event as triggering the :active state - and if the trigger contains a hyperlink this works, but there is no way to deactivate the active state of a hyperlink, safe for clicking on another hyperlink. This sucks, because my plan to have an elegant navigation (and some other stuff) pop up and hide from view with just css is foiled, the menu never collapses - but then why does the example on Ryan's page work? I did some testing and finally narrowed the key element down to a twitter widget he has embedded on his page. Some javascript styles the embedded tweet and in doing so, it affects the very :active and : hover solution that all of a sudden works via touch on iOS, even without hyperlinks. Can anybody tell me what causes this behavior and if I could emulate it without relying on a crazy hack like embedding a twitter widget and hiding it from view?
0
11,319,308
07/03/2012 21:15:33
1,109,843
12/21/2011 12:32:42
38
2
WP7 Rss Reader by category node
According to this tutorial http://msdn.microsoft.com/en-us/library/hh487167(v=vs.92).aspx i managed to make an application for wp7 that parse feeds and displaying them in the phone screen. For my needs i have to : First parse the nodes which they have specific node category and display them seperatly And second if the user scroll more than the categorized feeds number, i want automatically to load more older feeds just like google reader does... Is there any hint that i can get or any help... Thanks in advance, Nick Ioannidis
c#
windows-phone-7
rss-reader
categorization
null
null
open
WP7 Rss Reader by category node === According to this tutorial http://msdn.microsoft.com/en-us/library/hh487167(v=vs.92).aspx i managed to make an application for wp7 that parse feeds and displaying them in the phone screen. For my needs i have to : First parse the nodes which they have specific node category and display them seperatly And second if the user scroll more than the categorized feeds number, i want automatically to load more older feeds just like google reader does... Is there any hint that i can get or any help... Thanks in advance, Nick Ioannidis
0
11,661,662
07/26/2012 02:55:15
875,317
08/02/2011 19:11:50
1,914
25
XAML Pages in VS 2012 not displaying
When I try to look at any *.xaml page, I see instead an err msg, "*System.UnauthorizedAccessException Error 5: Access is denied : 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\Microsoft.CSharp.dll'*" Is it simply a matter of adding '**C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\Microsoft.CSharp.dll**' to my path, or...?
xaml
windows-8
null
null
null
null
open
XAML Pages in VS 2012 not displaying === When I try to look at any *.xaml page, I see instead an err msg, "*System.UnauthorizedAccessException Error 5: Access is denied : 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\Microsoft.CSharp.dll'*" Is it simply a matter of adding '**C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\Microsoft.CSharp.dll**' to my path, or...?
0
11,661,664
07/26/2012 02:55:43
1,513,637
07/10/2012 04:00:33
30
1
Java try and catch error
I am trying to try and catch an error in my method to write the contents of change drawer to a html document. The error, java.io.FileNotFoundException, appears when the file does not exist. The code below should do this but it comes up with the error "PartB is an incompatible type". I think there is an error in my try and catch code, this the first one I've written and I am at a loss as to why it won't work. Any help would be great. Thankyou. ... public static void writeHtmlFile() { try { BufferedReader in = new BufferedReader((new FileReader("changedrawer.html"))); String sLine; StringBuilder sb = new StringBuilder(); while ((sLine = in.readLine()) !=null) sb.append(sLine+"\n"); //Close file in.close(); //Output on console System.out.println(sb.toString()); } catch (PartB FileNotFoundException) //Why is PartB an incompatible type? (PartB is the name of the class) { System.out.println ("error"); } ...
java
try-catch
filewriter
null
null
null
open
Java try and catch error === I am trying to try and catch an error in my method to write the contents of change drawer to a html document. The error, java.io.FileNotFoundException, appears when the file does not exist. The code below should do this but it comes up with the error "PartB is an incompatible type". I think there is an error in my try and catch code, this the first one I've written and I am at a loss as to why it won't work. Any help would be great. Thankyou. ... public static void writeHtmlFile() { try { BufferedReader in = new BufferedReader((new FileReader("changedrawer.html"))); String sLine; StringBuilder sb = new StringBuilder(); while ((sLine = in.readLine()) !=null) sb.append(sLine+"\n"); //Close file in.close(); //Output on console System.out.println(sb.toString()); } catch (PartB FileNotFoundException) //Why is PartB an incompatible type? (PartB is the name of the class) { System.out.println ("error"); } ...
0
11,661,665
07/26/2012 02:55:46
384,936
07/06/2010 20:20:05
183
1
how to create new line after tag in xml serialization
I use xml serialization to create my xml snippets. each serialization does not create linebreak at the end resulting in open tags following close tags. See example output below where the close tag </DecisionBar> is followed in same line open tag <DecisionBar> how can i force the serialization object to be in a new line? maxmumleewayinticks=Instrument.MasterInstrument.TickSize*2; string filename="c:\\temp\\Strategyxmlfile" + DateTime.Now.Ticks + ".xml"; settings = new XmlWriterSettings(); settings.Indent = true; settings.IndentChars = " "; settings.NewLineChars = "\r\n"; settings.NewLineHandling = NewLineHandling.Replace; settings.OmitXmlDeclaration = true; settings.CloseOutput = false; writer= new StreamWriter(filename); ns.Add("", ""); // write and close the bar XmlSerializer serializer = new XmlSerializer(typeof( DecisionBar)); w =XmlWriter.Create(writer,settings); serializer.Serialize(w, decision,ns); Output: <DecisionBar EntryOrExit="ENTRY"> <mfe>0.0001</mfe> <mae>-0.0002</mae> <bartime>2012-07-25T21:43:00</bartime> <frequency>1 MINUTES</frequency> <HH7>true</HH7> <crossover>true</crossover> <currentprofitability>0.0001</currentprofitability> <entryPointLong>1.032</entryPointLong> <entryPointShort>1.0308</entryPointShort> <exitStopFull>1.031</exitStopFull> <exitStopPartial>0</exitStopPartial> </DecisionBar><DecisionBar> <mfe>0.0001</mfe> <mae>-0.0002</mae> <bartime>2012-07-25T21:44:00</bartime> <frequency>1 MINUTES</frequency> <HH7>false</HH7> <crossover>false</crossover> <currentprofitability>0.0001</currentprofitability> <entryPointLong>0</entryPointLong> <entryPointShort>0</entryPointShort> <exitStopFull>0</exitStopFull> <exitStopPartial>0</exitStopPartial> </DecisionBar>
c#
xml-serialization
null
null
null
null
open
how to create new line after tag in xml serialization === I use xml serialization to create my xml snippets. each serialization does not create linebreak at the end resulting in open tags following close tags. See example output below where the close tag </DecisionBar> is followed in same line open tag <DecisionBar> how can i force the serialization object to be in a new line? maxmumleewayinticks=Instrument.MasterInstrument.TickSize*2; string filename="c:\\temp\\Strategyxmlfile" + DateTime.Now.Ticks + ".xml"; settings = new XmlWriterSettings(); settings.Indent = true; settings.IndentChars = " "; settings.NewLineChars = "\r\n"; settings.NewLineHandling = NewLineHandling.Replace; settings.OmitXmlDeclaration = true; settings.CloseOutput = false; writer= new StreamWriter(filename); ns.Add("", ""); // write and close the bar XmlSerializer serializer = new XmlSerializer(typeof( DecisionBar)); w =XmlWriter.Create(writer,settings); serializer.Serialize(w, decision,ns); Output: <DecisionBar EntryOrExit="ENTRY"> <mfe>0.0001</mfe> <mae>-0.0002</mae> <bartime>2012-07-25T21:43:00</bartime> <frequency>1 MINUTES</frequency> <HH7>true</HH7> <crossover>true</crossover> <currentprofitability>0.0001</currentprofitability> <entryPointLong>1.032</entryPointLong> <entryPointShort>1.0308</entryPointShort> <exitStopFull>1.031</exitStopFull> <exitStopPartial>0</exitStopPartial> </DecisionBar><DecisionBar> <mfe>0.0001</mfe> <mae>-0.0002</mae> <bartime>2012-07-25T21:44:00</bartime> <frequency>1 MINUTES</frequency> <HH7>false</HH7> <crossover>false</crossover> <currentprofitability>0.0001</currentprofitability> <entryPointLong>0</entryPointLong> <entryPointShort>0</entryPointShort> <exitStopFull>0</exitStopFull> <exitStopPartial>0</exitStopPartial> </DecisionBar>
0
11,661,628
07/26/2012 02:51:05
1,323,697
04/10/2012 09:40:56
189
0
show child li when it's container ul is applied display:none
I am using sortable plugin of Jquery UI and playing with the example that it came with named "connect-lists.html". I want to hide the first ul by using `display:none` (not `visibility:hidden`!!) but let the `li` being dragged show on screen. This is the code of the demo: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Sortable - Connect lists</title> <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> <script src="../../jquery-1.7.2.js"></script> <script src="../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.mouse.js"></script> <script src="../../ui/jquery.ui.sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0 0 2.5em; float: left; margin-right: 10px; } #sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; overflow:visible;display:block; } </style> <script> $(function() { $( "#sortable1, #sortable2" ).sortable({ start: function(event, ui){ $('#sortable1').hide(); //is it possible to show the ui.item??? }, connectWith: ".connectedSortable" }).disableSelection(); }); </script> </head> <body> <div class="demo"> <ul id="sortable1" class="connectedSortable"> <li class="ui-state-default">Item 1</li> <li class="ui-state-default">Item 2</li> <li class="ui-state-default">Item 3</li> <li class="ui-state-default">Item 4</li> <li class="ui-state-default">Item 5</li> </ul> <ul id="sortable2" class="connectedSortable"> <li class="ui-state-highlight">Item 1</li> <li class="ui-state-highlight">Item 2</li> <li class="ui-state-highlight">Item 3</li> <li class="ui-state-highlight">Item 4</li> <li class="ui-state-highlight">Item 5</li> </ul> </div><!-- End demo --> <div class="demo-description"> <p> Sort items from one list into another and vice versa, by passing a selector into the <code>connectWith</code> option. The simplest way to do this is to group all related lists with a CSS class, and then pass that class into the sortable function (i.e., <code>connectWith: '.myclass'</code>). </p> </div><!-- End demo-description --> </body> </html> I've just added an start event and I hide the `ul` there. Problem here is when I start dragging the item from 1st list onto 2nd, both the ul and the li gets disappeared. How do I get around this issue?
javascript
jquery
html
css
sortable
null
open
show child li when it's container ul is applied display:none === I am using sortable plugin of Jquery UI and playing with the example that it came with named "connect-lists.html". I want to hide the first ul by using `display:none` (not `visibility:hidden`!!) but let the `li` being dragged show on screen. This is the code of the demo: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Sortable - Connect lists</title> <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"> <script src="../../jquery-1.7.2.js"></script> <script src="../../ui/jquery.ui.core.js"></script> <script src="../../ui/jquery.ui.widget.js"></script> <script src="../../ui/jquery.ui.mouse.js"></script> <script src="../../ui/jquery.ui.sortable.js"></script> <link rel="stylesheet" href="../demos.css"> <style> #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0 0 2.5em; float: left; margin-right: 10px; } #sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; overflow:visible;display:block; } </style> <script> $(function() { $( "#sortable1, #sortable2" ).sortable({ start: function(event, ui){ $('#sortable1').hide(); //is it possible to show the ui.item??? }, connectWith: ".connectedSortable" }).disableSelection(); }); </script> </head> <body> <div class="demo"> <ul id="sortable1" class="connectedSortable"> <li class="ui-state-default">Item 1</li> <li class="ui-state-default">Item 2</li> <li class="ui-state-default">Item 3</li> <li class="ui-state-default">Item 4</li> <li class="ui-state-default">Item 5</li> </ul> <ul id="sortable2" class="connectedSortable"> <li class="ui-state-highlight">Item 1</li> <li class="ui-state-highlight">Item 2</li> <li class="ui-state-highlight">Item 3</li> <li class="ui-state-highlight">Item 4</li> <li class="ui-state-highlight">Item 5</li> </ul> </div><!-- End demo --> <div class="demo-description"> <p> Sort items from one list into another and vice versa, by passing a selector into the <code>connectWith</code> option. The simplest way to do this is to group all related lists with a CSS class, and then pass that class into the sortable function (i.e., <code>connectWith: '.myclass'</code>). </p> </div><!-- End demo-description --> </body> </html> I've just added an start event and I hide the `ul` there. Problem here is when I start dragging the item from 1st list onto 2nd, both the ul and the li gets disappeared. How do I get around this issue?
0
11,648,268
07/25/2012 11:02:53
1,443,420
06/07/2012 23:55:22
27
4
C# accessing HTTPS Files
I have figured out(by inspecting both the website its-self and the response form the website when using my C# application) that the website in question does not use the form's nor cookies to do the secure connections so I am wondering if anyone knows of a way to potentially use the SSL certificate or the website headers(which by all accounts I think do have a cookie in them), to allow the log-in and then download of a certain file. Could I get code examples or links to ways to use the headers to log-in to a site is what I am asking, I have all the necessary credentials just not the extensive knowledge to use them. Thanks a bunch.
c#
null
null
null
null
null
open
C# accessing HTTPS Files === I have figured out(by inspecting both the website its-self and the response form the website when using my C# application) that the website in question does not use the form's nor cookies to do the secure connections so I am wondering if anyone knows of a way to potentially use the SSL certificate or the website headers(which by all accounts I think do have a cookie in them), to allow the log-in and then download of a certain file. Could I get code examples or links to ways to use the headers to log-in to a site is what I am asking, I have all the necessary credentials just not the extensive knowledge to use them. Thanks a bunch.
0
11,661,670
07/26/2012 02:56:28
1,447,608
06/10/2012 17:19:05
13
0
how to get browser history (a last hour history)
I want to get all the browser history records from browsers only a last hour history, I try this code Cursor mCur = activity.managedQuery(Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION, null, null, null); mCur.moveToFirst(); if (mCur.moveToFirst() && mCur.getCount() > 0) { while (mCur.isAfterLast() == false) { Log.v("titleIdx", mCur .getString(Browser.HISTORY_PROJECTION_TITLE_INDEX)); Log.v("urlIdx", mCur .getString(Browser.HISTORY_PROJECTION_URL_INDEX)); mCur.moveToNext(); } } but this code get all browser hitory, i want to get browser histoy only last hour history thanks
android
browser
history
null
null
null
open
how to get browser history (a last hour history) === I want to get all the browser history records from browsers only a last hour history, I try this code Cursor mCur = activity.managedQuery(Browser.BOOKMARKS_URI, Browser.HISTORY_PROJECTION, null, null, null); mCur.moveToFirst(); if (mCur.moveToFirst() && mCur.getCount() > 0) { while (mCur.isAfterLast() == false) { Log.v("titleIdx", mCur .getString(Browser.HISTORY_PROJECTION_TITLE_INDEX)); Log.v("urlIdx", mCur .getString(Browser.HISTORY_PROJECTION_URL_INDEX)); mCur.moveToNext(); } } but this code get all browser hitory, i want to get browser histoy only last hour history thanks
0
11,661,671
07/26/2012 02:56:35
1,228,293
02/23/2012 12:07:17
32
5
Crystal Reports 2011 viewing tool with record selection?
Is there any tool to view Crystal reports with functionality to edit the selection criteria of the report? This is because if I have develop a annual sales report my managers need to see the same report for may be few months. So that is just matter of editing the record selection criteria. Right now I have to change it form the report designer which is very inconvenient. Any tools to do this job, SAP Crystal reports viewer doesn't support this feature as far as I know.
view
crystal-reports
null
null
null
null
open
Crystal Reports 2011 viewing tool with record selection? === Is there any tool to view Crystal reports with functionality to edit the selection criteria of the report? This is because if I have develop a annual sales report my managers need to see the same report for may be few months. So that is just matter of editing the record selection criteria. Right now I have to change it form the report designer which is very inconvenient. Any tools to do this job, SAP Crystal reports viewer doesn't support this feature as far as I know.
0
11,499,288
07/16/2012 06:44:16
152,993
08/06/2009 23:30:50
324
16
Do you need to specify the -injars and -outjars options in ProGuard for Android builds?
The default android proguard.cfg file doesn't specify any `-injars` or an `-outjars` option, and I haven't found any documentation on what `-outjars'` output should be. On the other hand, the ProGuard site provides an android sample that includes `-injars` and `-outjars`. Which one should I follow?
android
proguard
null
null
null
null
open
Do you need to specify the -injars and -outjars options in ProGuard for Android builds? === The default android proguard.cfg file doesn't specify any `-injars` or an `-outjars` option, and I haven't found any documentation on what `-outjars'` output should be. On the other hand, the ProGuard site provides an android sample that includes `-injars` and `-outjars`. Which one should I follow?
0
11,499,289
07/16/2012 06:44:23
54,760
01/13/2009 20:41:17
1,018
17
What is MVC? Is it a default style of some apps?
What is MVC really? Is "model-view-controller" basically the way all ASP.NET programs in Visual Studio are made? Is it the default way WPF applications are arranged?
visual-studio-2010
mvc
asp.net-mvc-2
null
null
07/16/2012 12:33:50
not a real question
What is MVC? Is it a default style of some apps? === What is MVC really? Is "model-view-controller" basically the way all ASP.NET programs in Visual Studio are made? Is it the default way WPF applications are arranged?
1
11,499,646
07/16/2012 07:13:50
1,472,983
06/21/2012 18:14:33
32
0
Simulating CLI Shell with python
I was asked to simulate CLI with Python. This is what I did def somefunction(a,b): //codes here //consider some other functions too print "--- StackOverFlow Shell ---" while True: user_input = raw_input("#> ") splitit = user_input.split(" ") if splitit[0] == "add": firstNum = splitit[1] sNum = splitit[2] result = somefunction(firstNum, sNum) print result //consider some other elif blocks with "sub", "div", etc else: print "Invalid Command" I do also check the length of the list, here "splitit" I will allow only 3 argumets, first will be the operation, and second and third are the arguments with which some functions are to be performed, in case the argument is more than 3, for that i do put a check. Though Somehow I manage to make it work, but is there a better way to achieve the same?
python
cli
null
null
null
null
open
Simulating CLI Shell with python === I was asked to simulate CLI with Python. This is what I did def somefunction(a,b): //codes here //consider some other functions too print "--- StackOverFlow Shell ---" while True: user_input = raw_input("#> ") splitit = user_input.split(" ") if splitit[0] == "add": firstNum = splitit[1] sNum = splitit[2] result = somefunction(firstNum, sNum) print result //consider some other elif blocks with "sub", "div", etc else: print "Invalid Command" I do also check the length of the list, here "splitit" I will allow only 3 argumets, first will be the operation, and second and third are the arguments with which some functions are to be performed, in case the argument is more than 3, for that i do put a check. Though Somehow I manage to make it work, but is there a better way to achieve the same?
0
11,499,651
07/16/2012 07:14:03
15,127
09/17/2008 06:20:18
1,867
101
Oracle procedure param defined as .NUMBER, is it ok to pass it in as .INTEGER
I have two procedures in oracle which define a parameter differently, even though the underlying data is the same. In code we represent it as an integer. procedure GetByNum(..., vRegionID in number, ...) procedure GetByInt(...., vRegionID in integer, ...) In java we always define the field as an Integer (and in db too) public Integer getRegionID() { return 100; } Is there a way to pass this (in java) `integer` to both procedures using the same `OracleTypes.*`? We use a custom base wrapper around `org.springframework.jdbc.object.StoredProcedure` to call both of them. Modifying the stored procedures is not allowed for right now, so all that is left is fixing up the java. 1. Can you pass `getRegionID` as `OracleTypes.NUMBER` to the `getByInt` proc? 1. Can you pass it as `OracleTypes.INTEGER` to `getByNum`, which expects `in number`? 1. Another, magical way? This might seem simple, but I assume i'm not allowed to mangle parameters like this. I hope thats not true!
oracle
jdbc
null
null
null
null
open
Oracle procedure param defined as .NUMBER, is it ok to pass it in as .INTEGER === I have two procedures in oracle which define a parameter differently, even though the underlying data is the same. In code we represent it as an integer. procedure GetByNum(..., vRegionID in number, ...) procedure GetByInt(...., vRegionID in integer, ...) In java we always define the field as an Integer (and in db too) public Integer getRegionID() { return 100; } Is there a way to pass this (in java) `integer` to both procedures using the same `OracleTypes.*`? We use a custom base wrapper around `org.springframework.jdbc.object.StoredProcedure` to call both of them. Modifying the stored procedures is not allowed for right now, so all that is left is fixing up the java. 1. Can you pass `getRegionID` as `OracleTypes.NUMBER` to the `getByInt` proc? 1. Can you pass it as `OracleTypes.INTEGER` to `getByNum`, which expects `in number`? 1. Another, magical way? This might seem simple, but I assume i'm not allowed to mangle parameters like this. I hope thats not true!
0
11,499,652
07/16/2012 07:14:05
1,042,778
11/12/2011 03:49:47
235
2
Objective-C: Touch Draw Opacity
I am trying to make a drawing app that has a control on the opacity of the brush but when i tried to lower the opacity the result is like this. I used core graphics. (check the image). ![enter image description here][1] [1]: http://i.stack.imgur.com/WyCOL.png How will i resolve this issue? Here are some of my codes. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event//upon touches { UITouch *touch = [touches anyObject]; previousPoint1 = [touch locationInView:self.view]; previousPoint2 = [touch locationInView:self.view]; currentTouch = [touch locationInView:self.view]; } -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event//upon moving { UITouch *touch = [touches anyObject]; previousPoint2 = previousPoint1; previousPoint1 = currentTouch; currentTouch = [touch locationInView:self.view]; CGPoint mid1 = midPoint(previousPoint2, previousPoint1); CGPoint mid2 = midPoint(currentTouch, previousPoint1); UIGraphicsBeginImageContext(CGSizeMake(1024, 768)); [imgDraw.image drawInRect:CGRectMake(0, 0, 1024, 768)]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineCap(context,kCGLineCapRound); CGContextSetLineWidth(context, slider.value); CGContextSetBlendMode(context, blendMode); CGContextSetRGBStrokeColor(context,red, green, blue, 0.5); CGContextBeginPath(context); CGContextMoveToPoint(context, mid1.x, mid1.y); CGContextAddQuadCurveToPoint(context, previousPoint1.x, previousPoint1.y, mid2.x, mid2.y); CGContextStrokePath(context); imgDraw.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsGetCurrentContext(); endingPoint=currentTouch; }
objective-c
ios
core-graphics
null
null
null
open
Objective-C: Touch Draw Opacity === I am trying to make a drawing app that has a control on the opacity of the brush but when i tried to lower the opacity the result is like this. I used core graphics. (check the image). ![enter image description here][1] [1]: http://i.stack.imgur.com/WyCOL.png How will i resolve this issue? Here are some of my codes. -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event//upon touches { UITouch *touch = [touches anyObject]; previousPoint1 = [touch locationInView:self.view]; previousPoint2 = [touch locationInView:self.view]; currentTouch = [touch locationInView:self.view]; } -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event//upon moving { UITouch *touch = [touches anyObject]; previousPoint2 = previousPoint1; previousPoint1 = currentTouch; currentTouch = [touch locationInView:self.view]; CGPoint mid1 = midPoint(previousPoint2, previousPoint1); CGPoint mid2 = midPoint(currentTouch, previousPoint1); UIGraphicsBeginImageContext(CGSizeMake(1024, 768)); [imgDraw.image drawInRect:CGRectMake(0, 0, 1024, 768)]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineCap(context,kCGLineCapRound); CGContextSetLineWidth(context, slider.value); CGContextSetBlendMode(context, blendMode); CGContextSetRGBStrokeColor(context,red, green, blue, 0.5); CGContextBeginPath(context); CGContextMoveToPoint(context, mid1.x, mid1.y); CGContextAddQuadCurveToPoint(context, previousPoint1.x, previousPoint1.y, mid2.x, mid2.y); CGContextStrokePath(context); imgDraw.image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsGetCurrentContext(); endingPoint=currentTouch; }
0
11,499,656
07/16/2012 07:14:23
1,464,000
06/18/2012 14:38:08
28
0
How to remove some word in a sentences Java?
Assume the string is: `The/at Fulton/np-tl County/nn-tl Grand/jj-tl` How can I remove character after `/` and the out put as below `The Fulton County Grand`
java
string
null
null
null
null
open
How to remove some word in a sentences Java? === Assume the string is: `The/at Fulton/np-tl County/nn-tl Grand/jj-tl` How can I remove character after `/` and the out put as below `The Fulton County Grand`
0
11,499,663
07/16/2012 07:14:48
181,293
09/29/2009 17:24:30
100
2
Eclipse behavior on Linux when shared by multiple users
We are trying to setup Eclipse in a shared environment, i.e., it will be installed on a Linux server and each user connects to it using remote X. There are different reasons for sharing Eclipse, one being proper integration with ClearCase. Our admin has setup eclipse with some default plugins and each user accesses eclipse thru remote X. Now, I wanted to install a new plugin so that it can be used by everyone. After installing the plugin, it's accessible to me only, it's not available for others. However, the plugins installed by admin are available to everyone. When looked, the plugin installed by me and the plugin installed by admin are at different location: plugin installed by me: > /home/ernesto/.eclipse/org.eclipse.platform_4.2.0_53742576/plugins/ where /home/ernesto/ is my home directory. plugin installed by admin: > /project/eclipse/plugins/ where /project/eclipse is eclipse installation directory Is it due to permissions? Is this behavior documented somewhere? I am using eclipse juno 4.2, it's SuSE Linux server.
linux
eclipse
permissions
eclipse-plugin
eclipse-juno
null
open
Eclipse behavior on Linux when shared by multiple users === We are trying to setup Eclipse in a shared environment, i.e., it will be installed on a Linux server and each user connects to it using remote X. There are different reasons for sharing Eclipse, one being proper integration with ClearCase. Our admin has setup eclipse with some default plugins and each user accesses eclipse thru remote X. Now, I wanted to install a new plugin so that it can be used by everyone. After installing the plugin, it's accessible to me only, it's not available for others. However, the plugins installed by admin are available to everyone. When looked, the plugin installed by me and the plugin installed by admin are at different location: plugin installed by me: > /home/ernesto/.eclipse/org.eclipse.platform_4.2.0_53742576/plugins/ where /home/ernesto/ is my home directory. plugin installed by admin: > /project/eclipse/plugins/ where /project/eclipse is eclipse installation directory Is it due to permissions? Is this behavior documented somewhere? I am using eclipse juno 4.2, it's SuSE Linux server.
0
11,499,669
07/16/2012 07:15:05
389,312
07/12/2010 08:59:48
100
2
How to overlay <div> relative position within Chrome PDF embed
Chrome is using `<embed>` to display PDF within browser, but i need to adding `<div>` overlay on PDF viewer with relative scrolling, Have anyway todo that ? Currently I can overlay `<div>` with css `position:absolute;` but that isn't relative with scrolling in PDF embed.
html
css
google-chrome
pdf
null
null
open
How to overlay <div> relative position within Chrome PDF embed === Chrome is using `<embed>` to display PDF within browser, but i need to adding `<div>` overlay on PDF viewer with relative scrolling, Have anyway todo that ? Currently I can overlay `<div>` with css `position:absolute;` but that isn't relative with scrolling in PDF embed.
0
11,541,383
07/18/2012 12:29:47
1,534,724
07/18/2012 12:07:36
1
0
Ordering by list of strings in Oracle SQL without LISTAGG
I'm working with two entities: `Item` and `Attribute`, which look something like the following: Item ---- itemId Attribute --------- attributeId name An `Item` has `Attributes`, as specified in an association table: ItemAttribute -------------- itemId attributeId When this data gets to the client, it will be displayed with a row per `Item`, and each row will have a list of `Attribute`s by name. For example: Item Attributes ---- ---------- 1 A, B, C 2 A, C 3 A, B The user will have the option to sort on the `Attributes` column, so we need the ability to sort the data as follows: Item Attributes ---- ---------- 3 A, B 1 A, B, C 2 A, C Oracle's `LISTAGG` function can be used to generate the attribute lists prior to sorting; however `Attribute.name` can be a very long string, and it is possible that the combined list is greater than 4000 characters, which would cause the query to fail. Is there a clean, efficient way to sort the data in this manner using Oracle SQL (11gR2)?
sql
oracle
oracle11gr2
null
null
null
open
Ordering by list of strings in Oracle SQL without LISTAGG === I'm working with two entities: `Item` and `Attribute`, which look something like the following: Item ---- itemId Attribute --------- attributeId name An `Item` has `Attributes`, as specified in an association table: ItemAttribute -------------- itemId attributeId When this data gets to the client, it will be displayed with a row per `Item`, and each row will have a list of `Attribute`s by name. For example: Item Attributes ---- ---------- 1 A, B, C 2 A, C 3 A, B The user will have the option to sort on the `Attributes` column, so we need the ability to sort the data as follows: Item Attributes ---- ---------- 3 A, B 1 A, B, C 2 A, C Oracle's `LISTAGG` function can be used to generate the attribute lists prior to sorting; however `Attribute.name` can be a very long string, and it is possible that the combined list is greater than 4000 characters, which would cause the query to fail. Is there a clean, efficient way to sort the data in this manner using Oracle SQL (11gR2)?
0
11,541,388
07/18/2012 12:30:09
1,344,851
04/19/2012 19:01:56
199
4
aligne buttons or space between buttons in navigation bar programmatically
I create navigation controller via storyboard interface and I added 4 buttons programmatically on navigation bar but I don't know how should I justify it would you please help me ! here is the picture: ![enter image description here][1] thanks in advance! here is my code for buttons I know That I used **rightBarButtonItems** but I don't know what should I write instead! - (void)viewDidLoad { [super viewDidLoad]; UIBarButtonItem *menuButton= [[UIBarButtonItem alloc] initWithTitle:@"Menu" style:UIBarButtonItemStyleDone target:self action:@selector(menu:)]; UIBarButtonItem *yearButton= [[UIBarButtonItem alloc] initWithTitle:@"Year" style:UIBarButtonItemStyleDone target:self action:@selector(year:)]; UIBarButtonItem *weekButton= [[UIBarButtonItem alloc] initWithTitle:@"Week" style:UIBarButtonItemStyleDone target:self action:@selector(week:)]; UIBarButtonItem *reportButton= [[UIBarButtonItem alloc] initWithTitle:@"Report" style:UIBarButtonItemStyleDone target:self action:@selector(report:)]; NSArray *buttons = [NSArray arrayWithObjects:menuButton,yearButton,weekButton,reportButton,nil]; self.navigationItem.rightBarButtonItems = buttons; } [1]: http://i.stack.imgur.com/M6N40.png
iphone
objective-c
ios
storyboard
null
null
open
aligne buttons or space between buttons in navigation bar programmatically === I create navigation controller via storyboard interface and I added 4 buttons programmatically on navigation bar but I don't know how should I justify it would you please help me ! here is the picture: ![enter image description here][1] thanks in advance! here is my code for buttons I know That I used **rightBarButtonItems** but I don't know what should I write instead! - (void)viewDidLoad { [super viewDidLoad]; UIBarButtonItem *menuButton= [[UIBarButtonItem alloc] initWithTitle:@"Menu" style:UIBarButtonItemStyleDone target:self action:@selector(menu:)]; UIBarButtonItem *yearButton= [[UIBarButtonItem alloc] initWithTitle:@"Year" style:UIBarButtonItemStyleDone target:self action:@selector(year:)]; UIBarButtonItem *weekButton= [[UIBarButtonItem alloc] initWithTitle:@"Week" style:UIBarButtonItemStyleDone target:self action:@selector(week:)]; UIBarButtonItem *reportButton= [[UIBarButtonItem alloc] initWithTitle:@"Report" style:UIBarButtonItemStyleDone target:self action:@selector(report:)]; NSArray *buttons = [NSArray arrayWithObjects:menuButton,yearButton,weekButton,reportButton,nil]; self.navigationItem.rightBarButtonItems = buttons; } [1]: http://i.stack.imgur.com/M6N40.png
0
11,541,389
07/18/2012 12:30:08
1,194,078
02/07/2012 07:32:34
8
0
How to compare two columns from 2 different tables in 2 datasets in ASP.NET C#
**I have 2 tables Table1 and Table2 in 2 dataset. Both the tables are having the column "ID". I want to find the diffrence in values present in column "ID"**
c#
sql-server-2008
null
null
null
07/19/2012 04:46:49
not a real question
How to compare two columns from 2 different tables in 2 datasets in ASP.NET C# === **I have 2 tables Table1 and Table2 in 2 dataset. Both the tables are having the column "ID". I want to find the diffrence in values present in column "ID"**
1
11,541,398
07/18/2012 12:30:43
1,269,775
03/14/2012 18:04:50
6
0
WSO2 dataservice archive export (.car) throws following "error occurred while exporting the archive: index: 0, size: 0"
I am working on the Retail Banking Example which comes with the new Developer Studio. I am using Java 1.7 sdk with the developer studio I have finished all the artifacts in the example and when i try to export the files as a carbon application archive (car) to be deployed on the server i get he following error. "error occurred while exporting the archive: index: 0, size: 0" see link below for error snapshot This only happens when i try to export the Customer data service. All the others i can export fine. Am i missing something here ? Any help on this would be appreciated Umar [1]: http://i.stack.imgur.com/7lFwY.jpg
wso2
null
null
null
null
null
open
WSO2 dataservice archive export (.car) throws following "error occurred while exporting the archive: index: 0, size: 0" === I am working on the Retail Banking Example which comes with the new Developer Studio. I am using Java 1.7 sdk with the developer studio I have finished all the artifacts in the example and when i try to export the files as a carbon application archive (car) to be deployed on the server i get he following error. "error occurred while exporting the archive: index: 0, size: 0" see link below for error snapshot This only happens when i try to export the Customer data service. All the others i can export fine. Am i missing something here ? Any help on this would be appreciated Umar [1]: http://i.stack.imgur.com/7lFwY.jpg
0
11,541,401
07/18/2012 12:30:45
1,410,185
05/22/2012 12:20:06
311
14
Highcharts and highstock license with google adds web site
if i use `highcharts` or `highstock` in my web site and add some `Google Adds` to this web site does my web site consider as a profit site and requires me to buy a license
highcharts
highstock
null
null
null
null
open
Highcharts and highstock license with google adds web site === if i use `highcharts` or `highstock` in my web site and add some `Google Adds` to this web site does my web site consider as a profit site and requires me to buy a license
0
11,541,405
07/18/2012 12:30:53
1,436,634
06/05/2012 06:06:35
17
0
Update issue with sqliteManager
Guys I'm not being able to do an update, but inserts and selects work fine. I'm getting buts with this, cannot find the pitfall.. Note: 1) I'm using the wrapper from: https://github.com/misato/SQLiteManager4iOS 2) The same code works for the INSERT statement, but not for the update //NSString* sqlStr = (@"INSERT INTO sbu (sbuName) VALUES ( 'rrrr' );)"); //WORKS 3) The data.db is saved inside the Documents folder for the APP 4) Here are the codes: The code associated with this update as follows: ///my inline code NSString* sqlStr = (@"UPDATE User SET Name = 'wweerr' WHERE Id = 19"); //using a direct sql to verify if it works - does not SQLiteManager* dbManager =[[SQLiteManager alloc]initWithDatabaseNamed:@"data.db"]; NSError* error = [dbManager doQuery:sqlStr]; ///from the library: - (NSError *)doQuery:(NSString *)sql { NSError *openError = nil; NSError *errorQuery = nil; //Check if database is open and ready. if (db == nil) { openError = [self openDatabase]; } if (openError == nil) { sqlite3_stmt *statement; const char *query = [sql UTF8String]; sqlite3_prepare_v2(db, query, -1, &statement, NULL); if (sqlite3_step(statement) == SQLITE_ERROR) { const char *errorMsg = sqlite3_errmsg(db); errorQuery = [self createDBErrorWithDescription:[NSString stringWithCString:errorMsg encoding:NSUTF8StringEncoding] andCode:kDBErrorQuery]; } //NSLog(@"sql error: %@", error) NSInteger result = sqlite3_finalize(statement); errorQuery = [self closeDatabase]; } else { errorQuery = openError; }
iphone
ios
ipad
sqlite
imac
null
open
Update issue with sqliteManager === Guys I'm not being able to do an update, but inserts and selects work fine. I'm getting buts with this, cannot find the pitfall.. Note: 1) I'm using the wrapper from: https://github.com/misato/SQLiteManager4iOS 2) The same code works for the INSERT statement, but not for the update //NSString* sqlStr = (@"INSERT INTO sbu (sbuName) VALUES ( 'rrrr' );)"); //WORKS 3) The data.db is saved inside the Documents folder for the APP 4) Here are the codes: The code associated with this update as follows: ///my inline code NSString* sqlStr = (@"UPDATE User SET Name = 'wweerr' WHERE Id = 19"); //using a direct sql to verify if it works - does not SQLiteManager* dbManager =[[SQLiteManager alloc]initWithDatabaseNamed:@"data.db"]; NSError* error = [dbManager doQuery:sqlStr]; ///from the library: - (NSError *)doQuery:(NSString *)sql { NSError *openError = nil; NSError *errorQuery = nil; //Check if database is open and ready. if (db == nil) { openError = [self openDatabase]; } if (openError == nil) { sqlite3_stmt *statement; const char *query = [sql UTF8String]; sqlite3_prepare_v2(db, query, -1, &statement, NULL); if (sqlite3_step(statement) == SQLITE_ERROR) { const char *errorMsg = sqlite3_errmsg(db); errorQuery = [self createDBErrorWithDescription:[NSString stringWithCString:errorMsg encoding:NSUTF8StringEncoding] andCode:kDBErrorQuery]; } //NSLog(@"sql error: %@", error) NSInteger result = sqlite3_finalize(statement); errorQuery = [self closeDatabase]; } else { errorQuery = openError; }
0
11,650,323
07/25/2012 13:01:24
1,526,613
07/15/2012 07:46:58
6
0
background color of list become white in scrolling when using android.support.v4.app.ListFragment;
I'm facing a critical problem. I'm trying to change background color (transparent) of list in scrolling time but unable to do it. I tried to change is by xml of listView as well as by code too. but in both condition **list background become white**. I'm using android.support.v4.app.ListFragment; and FragmentPagerAdapter. I wanna change list scroll time color change. for this i'm using following code. public static class ArrayListFragment extends ListFragment { int mNum; /** * Create a new instance of CountingFragment, providing "num" * as an argument. */ static ArrayListFragment newInstance(int num) { ArrayListFragment f = new ArrayListFragment(); // Supply num input as an argument. Bundle args = new Bundle(); args.putInt("num", num); f.setArguments(args); return f; } /** * When creating, retrieve this instance's number from its arguments. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mNum = getArguments() != null ? getArguments().getInt("num") : 1; } /** * The Fragment's UI is just a simple text view showing its * instance number. */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_pager_list, container, false); //v.setBackgroundResource(R.drawable.background); View tv = v.findViewById(R.id.text); ((TextView)tv).setText(frameName()); return v; } // @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); setListAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_checked, RishavArraylist() )); } Please tell me how i can change background of scrolling list at run time?? Thank you.
android
android-layout
arraylist
android-listview
android-listfragment
null
open
background color of list become white in scrolling when using android.support.v4.app.ListFragment; === I'm facing a critical problem. I'm trying to change background color (transparent) of list in scrolling time but unable to do it. I tried to change is by xml of listView as well as by code too. but in both condition **list background become white**. I'm using android.support.v4.app.ListFragment; and FragmentPagerAdapter. I wanna change list scroll time color change. for this i'm using following code. public static class ArrayListFragment extends ListFragment { int mNum; /** * Create a new instance of CountingFragment, providing "num" * as an argument. */ static ArrayListFragment newInstance(int num) { ArrayListFragment f = new ArrayListFragment(); // Supply num input as an argument. Bundle args = new Bundle(); args.putInt("num", num); f.setArguments(args); return f; } /** * When creating, retrieve this instance's number from its arguments. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mNum = getArguments() != null ? getArguments().getInt("num") : 1; } /** * The Fragment's UI is just a simple text view showing its * instance number. */ @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_pager_list, container, false); //v.setBackgroundResource(R.drawable.background); View tv = v.findViewById(R.id.text); ((TextView)tv).setText(frameName()); return v; } // @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); setListAdapter(new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_checked, RishavArraylist() )); } Please tell me how i can change background of scrolling list at run time?? Thank you.
0
11,650,324
07/25/2012 13:01:28
1,035,346
11/08/2011 09:45:55
20
2
Discretization of probability array in Python
I have a numpy array (actually imported from a GIS raster map) which contains probability values of occurrence of a species like following example: a = random.randint(1.0,20.0,1200).reshape(40,30) b = (a*1.0)/sum(a) Now I want to get a discrete version for that array again. Like if I have e.g. 100 individuals which are located on the area of that array (1200 cells) how are they distributed? Of course they should be distributed according to their probability, meaning lower values indicated lower probability of occurrence. However, as everything is statistics there is still the chance that a individual is located at a low probability cell. It should be possible that multiple individuals can occupy on cell..... It is like transforming a continuous distribution curve into a histogram again. Like many different histograms may result in a certain distribution curve it should also be the other way round. Accordingly applying the algorithm I am looking for will produce different discrete values each time. ...is there any algorithm in python which can do that? As I am not that familiar with discretization maybe someone can help. /Johannes
python
probability
null
null
null
null
open
Discretization of probability array in Python === I have a numpy array (actually imported from a GIS raster map) which contains probability values of occurrence of a species like following example: a = random.randint(1.0,20.0,1200).reshape(40,30) b = (a*1.0)/sum(a) Now I want to get a discrete version for that array again. Like if I have e.g. 100 individuals which are located on the area of that array (1200 cells) how are they distributed? Of course they should be distributed according to their probability, meaning lower values indicated lower probability of occurrence. However, as everything is statistics there is still the chance that a individual is located at a low probability cell. It should be possible that multiple individuals can occupy on cell..... It is like transforming a continuous distribution curve into a histogram again. Like many different histograms may result in a certain distribution curve it should also be the other way round. Accordingly applying the algorithm I am looking for will produce different discrete values each time. ...is there any algorithm in python which can do that? As I am not that familiar with discretization maybe someone can help. /Johannes
0
11,650,326
07/25/2012 13:01:31
778,286
05/31/2011 20:02:49
109
0
ValueList from ExecuteSQL() based query in FMP 12
I'm looking into upgrading our FMP11 developed solution to FMP12. For us, key functionality exists around the ValueList feature to DISPLAY one value (e.g. a description) while RETURNING another value (e.g. a UID), into the selected field. I would be interested if you have been able to replicate this feature from the ExecuteSQL() function (I can successfully return a single ValueList ... having trouble with the above) many thanks in advance Giles
filemaker
null
null
null
null
null
open
ValueList from ExecuteSQL() based query in FMP 12 === I'm looking into upgrading our FMP11 developed solution to FMP12. For us, key functionality exists around the ValueList feature to DISPLAY one value (e.g. a description) while RETURNING another value (e.g. a UID), into the selected field. I would be interested if you have been able to replicate this feature from the ExecuteSQL() function (I can successfully return a single ValueList ... having trouble with the above) many thanks in advance Giles
0
11,650,327
07/25/2012 13:01:40
623,401
02/18/2011 15:44:58
319
4
Refreshing android Listview
I am trying to reload the list view when the data has changed. But its not working.Here is the code I am using localPits.clear();// this.adapter.clear(); //Fetch new data and update the list this.localPits.addAll(pl); this.adapter.notifyDataSetChanged(); this.lst_Pits.invalidate(); Each time I call this portion of code existing values are successfully removed. But new values are not loaded in the list view. How can I do this in android? Thanks
java
android
android-listview
android-arrayadapter
null
null
open
Refreshing android Listview === I am trying to reload the list view when the data has changed. But its not working.Here is the code I am using localPits.clear();// this.adapter.clear(); //Fetch new data and update the list this.localPits.addAll(pl); this.adapter.notifyDataSetChanged(); this.lst_Pits.invalidate(); Each time I call this portion of code existing values are successfully removed. But new values are not loaded in the list view. How can I do this in android? Thanks
0
11,650,328
07/25/2012 13:01:41
1,428,396
05/31/2012 12:30:51
13
2
Using reliable multicast (Pragmatic General Multicast) not returning from accept
I am recently working on a project, which requires transmit data from one sender to multiple receivers reliably. So I took the PGM approach from Microsoft. The problem is after I started the receiver, it stopped in accept. It looks to me waiting for incoming connections. According to MS, after the receiver returns from accept. It returns a client socket, which is to be used for receiving. After I started the sender, connect and send are called. I can see from the wireshark log, the packages did have been sent from sender and arrived at the receiver. I can also see from the wireshark log the IP address of receiver joining the mcast group. But the receiver application never returns from calling "accept". Could anyone help me out of this? Thanks a lot. Receiver: WSAStartup(wVersionRequested, &wsaData) SOCKET sock = socket (AF_INET, SOCK_RDM, IPPROTO_RM); salocal.sin_family = AF_INET; salocal.sin_port = htons( mPort ); salocal.sin_addr.s_addr = inet_addr( PGM_MULTICAST_ADDRESS.c_str() ); int errCode = bind (sock, (SOCKADDR *)&salocal, sizeof(salocal)); errCode = listen (sock, 10); ULONG localif = inet_addr("10.0.12.10"); setsockopt(sock, IPPROTO_RM, RM_ADD_RECEIVE_IF, (char *)&localif, sizeof(localif)); sasessionsz = sizeof(sasession); mClientSocket = accept (sock, (SOCKADDR *)&sasession, &sasessionsz); Sender: WSAStartup(wVersionRequested, &wsaData) SOCKADDR_IN salocal, sasession; mSocket = socket (AF_INET, SOCK_RDM, IPPROTO_RM); salocal.sin_family = AF_INET; salocal.sin_port = htons (0); // Port is ignored here salocal.sin_addr.s_addr = htonl (INADDR_ANY); errCode = ::bind (mSocket, (SOCKADDR *)&salocal, sizeof(salocal)); sasession.sin_family = AF_INET; sasession.sin_port = htons ( mPort ); sasession.sin_addr.s_addr = inet_addr ( PGM_MULTICAST_ADDRESS.c_str() ); errCode = ::connect (mSocket, (SOCKADDR *)&sasession, sizeof(sasession));
c++
multicast
pgm
null
null
null
open
Using reliable multicast (Pragmatic General Multicast) not returning from accept === I am recently working on a project, which requires transmit data from one sender to multiple receivers reliably. So I took the PGM approach from Microsoft. The problem is after I started the receiver, it stopped in accept. It looks to me waiting for incoming connections. According to MS, after the receiver returns from accept. It returns a client socket, which is to be used for receiving. After I started the sender, connect and send are called. I can see from the wireshark log, the packages did have been sent from sender and arrived at the receiver. I can also see from the wireshark log the IP address of receiver joining the mcast group. But the receiver application never returns from calling "accept". Could anyone help me out of this? Thanks a lot. Receiver: WSAStartup(wVersionRequested, &wsaData) SOCKET sock = socket (AF_INET, SOCK_RDM, IPPROTO_RM); salocal.sin_family = AF_INET; salocal.sin_port = htons( mPort ); salocal.sin_addr.s_addr = inet_addr( PGM_MULTICAST_ADDRESS.c_str() ); int errCode = bind (sock, (SOCKADDR *)&salocal, sizeof(salocal)); errCode = listen (sock, 10); ULONG localif = inet_addr("10.0.12.10"); setsockopt(sock, IPPROTO_RM, RM_ADD_RECEIVE_IF, (char *)&localif, sizeof(localif)); sasessionsz = sizeof(sasession); mClientSocket = accept (sock, (SOCKADDR *)&sasession, &sasessionsz); Sender: WSAStartup(wVersionRequested, &wsaData) SOCKADDR_IN salocal, sasession; mSocket = socket (AF_INET, SOCK_RDM, IPPROTO_RM); salocal.sin_family = AF_INET; salocal.sin_port = htons (0); // Port is ignored here salocal.sin_addr.s_addr = htonl (INADDR_ANY); errCode = ::bind (mSocket, (SOCKADDR *)&salocal, sizeof(salocal)); sasession.sin_family = AF_INET; sasession.sin_port = htons ( mPort ); sasession.sin_addr.s_addr = inet_addr ( PGM_MULTICAST_ADDRESS.c_str() ); errCode = ::connect (mSocket, (SOCKADDR *)&sasession, sizeof(sasession));
0
11,581,389
07/20/2012 14:28:45
549,487
12/21/2010 04:30:18
109
6
Why double click on tabbaritem make the selected image back?
In this [link][1], the author provide a useful way to fulfill a custom tabbar. But facing a bug that when double click the tabbaritem, the gray image will come back, why? http://blog.theanalogguy.be/2011/09/14/custom-colored-uitabbar-icons-an-update/ [1]: http://blog.theanalogguy.be/2011/09/14/custom-colored-uitabbar-icons-an-update/
ios
custom-controls
uitabbar
null
null
null
open
Why double click on tabbaritem make the selected image back? === In this [link][1], the author provide a useful way to fulfill a custom tabbar. But facing a bug that when double click the tabbaritem, the gray image will come back, why? http://blog.theanalogguy.be/2011/09/14/custom-colored-uitabbar-icons-an-update/ [1]: http://blog.theanalogguy.be/2011/09/14/custom-colored-uitabbar-icons-an-update/
0
11,650,331
07/25/2012 13:01:51
1,526,133
07/14/2012 21:04:21
1
1
Google spreadsheet Query Error - column doesn't exist
another problem with Google Spreadsheet API. I'm trying to use Query() function in order to get all customers from our database who are from Warsaw. Google API seems however to have a big problem with parsing my query. I've checked it few times and everything is OK - tried semicolons, different apostrophes and column names - it still won't work. I type this code in the sheet cell: = Query(ImportRange("0ArsOaWajjzv9dEdGTUZCWFc1NnFva05uWkxETVF6Q0E"; "Kuchnia polska!A3:G40"); "select B where E contains 'Warszawa'") And get error like this: error: Invalid query: Column [E] does not exist in table. And I'm 110% sure that the column exists and the spreadsheet key is OK ;)
query
api
google
spreadsheet
null
null
open
Google spreadsheet Query Error - column doesn't exist === another problem with Google Spreadsheet API. I'm trying to use Query() function in order to get all customers from our database who are from Warsaw. Google API seems however to have a big problem with parsing my query. I've checked it few times and everything is OK - tried semicolons, different apostrophes and column names - it still won't work. I type this code in the sheet cell: = Query(ImportRange("0ArsOaWajjzv9dEdGTUZCWFc1NnFva05uWkxETVF6Q0E"; "Kuchnia polska!A3:G40"); "select B where E contains 'Warszawa'") And get error like this: error: Invalid query: Column [E] does not exist in table. And I'm 110% sure that the column exists and the spreadsheet key is OK ;)
0
11,650,338
07/25/2012 13:02:13
595,234
01/29/2011 19:50:30
438
0
easiest way to build a POC demo application
I need to do a POC (Proof of Concept) to a client, I want to build this demo with this requirements: 1. it can save, update, create and search object. 2. it can drag and drop, just like WYSIWYG HTML Editor 3. easy to set up . 4. easiness and efficiency is most important. 5. no need to think about those high-end tech, like transaction, audit ... I am thinking C# windows form / ASP.NET , Java Swing / JSP. What is your recommendation ? Thanks
c#
java
null
null
null
07/25/2012 13:08:17
not a real question
easiest way to build a POC demo application === I need to do a POC (Proof of Concept) to a client, I want to build this demo with this requirements: 1. it can save, update, create and search object. 2. it can drag and drop, just like WYSIWYG HTML Editor 3. easy to set up . 4. easiness and efficiency is most important. 5. no need to think about those high-end tech, like transaction, audit ... I am thinking C# windows form / ASP.NET , Java Swing / JSP. What is your recommendation ? Thanks
1
11,650,251
07/25/2012 12:57:55
859,154
07/23/2011 09:23:42
15,368
725
Multi sums in one linq statement?
I have this simple datatable : type (string) | cnt (int) _____________________________________ aaa 1 aaa 2 aaa 10 bbb 1 bb 1 I want to produce an anonymous type like this : (in **1** linq statement) { sumAAA= 13 , sumBBB=2 //13=1+2+10.... } something like : (psuedo code ) var obj= dt.AsEnumerable().Select(f=> new { sumAAA =f.sumOfCntOfAaa , sumBBB =f.sumOfCntOfBbb }); any help ? edit , this will help you DataTable dt = new DataTable("myTable"); dt.Columns.Add("cnt", typeof (int)); dt.Columns.Add("type", typeof (string)); DataRow row = dt.NewRow(); row["cnt"] = 1; row["type"] = "aaa"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 2; row["type"] = "aaa"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 10; row["type"] = "aaa"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 1; row["type"] = "bbb"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 1; row["type"] = "bbb"; dt.Rows.Add(row);
c#
.net
linq
.net-4.0
null
null
open
Multi sums in one linq statement? === I have this simple datatable : type (string) | cnt (int) _____________________________________ aaa 1 aaa 2 aaa 10 bbb 1 bb 1 I want to produce an anonymous type like this : (in **1** linq statement) { sumAAA= 13 , sumBBB=2 //13=1+2+10.... } something like : (psuedo code ) var obj= dt.AsEnumerable().Select(f=> new { sumAAA =f.sumOfCntOfAaa , sumBBB =f.sumOfCntOfBbb }); any help ? edit , this will help you DataTable dt = new DataTable("myTable"); dt.Columns.Add("cnt", typeof (int)); dt.Columns.Add("type", typeof (string)); DataRow row = dt.NewRow(); row["cnt"] = 1; row["type"] = "aaa"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 2; row["type"] = "aaa"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 10; row["type"] = "aaa"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 1; row["type"] = "bbb"; dt.Rows.Add(row); row = dt.NewRow(); row["cnt"] = 1; row["type"] = "bbb"; dt.Rows.Add(row);
0
11,650,254
07/25/2012 12:57:57
1,077,077
12/02/2011 09:31:44
1
0
Get gitdir if a filename is in a git repository
I have a script that need to check if a file was committed. The filename is the first argument of the script. I know that i can get gitdir with command like this: gitdir=$(cd $(dirname $filename) && git rev-parse --git-dir 2>/dev/null) but is there another method to get the gitdir without first cd in the directory ?
git
null
null
null
null
null
open
Get gitdir if a filename is in a git repository === I have a script that need to check if a file was committed. The filename is the first argument of the script. I know that i can get gitdir with command like this: gitdir=$(cd $(dirname $filename) && git rev-parse --git-dir 2>/dev/null) but is there another method to get the gitdir without first cd in the directory ?
0
11,650,255
07/25/2012 12:58:02
1,523,488
07/13/2012 12:06:06
28
0
Array int for query db
MySqlCommand cmd = new MySqlCommand("select id from table", conn); MySqlDataReader dr = cmd.ExecuteReader(); for example i get 4 row, so 23,3,12,9 how i can get array this integer? int[] arr = {23,3,12,9};
c#
null
null
null
null
null
open
Array int for query db === MySqlCommand cmd = new MySqlCommand("select id from table", conn); MySqlDataReader dr = cmd.ExecuteReader(); for example i get 4 row, so 23,3,12,9 how i can get array this integer? int[] arr = {23,3,12,9};
0
11,226,550
06/27/2012 12:46:06
1,475,234
06/22/2012 15:14:46
1
0
Session value is changing during the execution of code
I am working in an asp.net project,i am storing values to session during the Page Load in the Master Page.I am accessing these values in the web user controls,which is placed in the template page(this template page is inherited from the master page)now the issue is i am not getting the session values in the user control properly.While i executed the code in debug mode i came to know that i am getting the session value at the beginning of the function,but the value is being cleared at the end of the function.This is an absurd situation. Have anyone faced this kind of issues? Can anyone help me in solving this issue?
asp.net
c#-4.0
null
null
null
null
open
Session value is changing during the execution of code === I am working in an asp.net project,i am storing values to session during the Page Load in the Master Page.I am accessing these values in the web user controls,which is placed in the template page(this template page is inherited from the master page)now the issue is i am not getting the session values in the user control properly.While i executed the code in debug mode i came to know that i am getting the session value at the beginning of the function,but the value is being cleared at the end of the function.This is an absurd situation. Have anyone faced this kind of issues? Can anyone help me in solving this issue?
0
11,226,553
06/27/2012 12:46:16
720,077
04/22/2011 05:08:17
225
5
Phpstorm cursor jumping back constantly at long lines
When I have a long line and want to type text at the end, the cursor constantly jumping back to the middle of the text, for example: from here: ![enter image description here][3] to here: ![enter image description here][2]. Is it a bug or a feature ? How can I turn it off ? My PHPstorm version is 4.0.2 (#PS-117.501) [2]: http://i.stack.imgur.com/JEwlo.png [3]: http://i.stack.imgur.com/z1pWc.png
intellij-idea
phpstorm
cursor-position
null
null
null
open
Phpstorm cursor jumping back constantly at long lines === When I have a long line and want to type text at the end, the cursor constantly jumping back to the middle of the text, for example: from here: ![enter image description here][3] to here: ![enter image description here][2]. Is it a bug or a feature ? How can I turn it off ? My PHPstorm version is 4.0.2 (#PS-117.501) [2]: http://i.stack.imgur.com/JEwlo.png [3]: http://i.stack.imgur.com/z1pWc.png
0
11,226,373
06/27/2012 12:36:42
1,485,623
06/27/2012 12:25:21
1
0
jQuery Form file upload IE8 error response null
I have an issue specific to IE8 with the jQuery form plugin. I am uploading a single file through a multipart/form-data and am using the jQuery plugin to do error handling. Everything works fine in FF but in IE8, the jqHXR object that gets passed in the error handling method is empty (status = 0, text = null, etc.). Here is some of the code I am using: HTML Form: <form name=\"myForm\" id=\"myForm\" action=\"uploadServlet\" method=\"POST\" enctype=\"multipart/form-data\">"); <input type=\"file\" id=\"browseBox\" name=\"file1\"/> <input type=\"submit\" id=\"uploadButton\"/> </form> jQuery: $("#myForm").submit(upload); $("#myForm").ajaxForm(); function upload() { var options = { async: false, success: uploadSuccessful, error: uploadError } $("#myForm").ajaxSubmit(options); return false; } function uploadSuccessful(data) { alert(data); } function uploadError(jqXHR, textStatus, err) { alert(jqXHR.responseText); } Like I mentioned jqXHR is empty in IE8, but not so in FF. The servlet responds with plain text that I display to the user. Any ideas why IE8 specifically fails at getting the response from my servlet ?
jquery
ajax
forms
internet-explorer-8
response
null
open
jQuery Form file upload IE8 error response null === I have an issue specific to IE8 with the jQuery form plugin. I am uploading a single file through a multipart/form-data and am using the jQuery plugin to do error handling. Everything works fine in FF but in IE8, the jqHXR object that gets passed in the error handling method is empty (status = 0, text = null, etc.). Here is some of the code I am using: HTML Form: <form name=\"myForm\" id=\"myForm\" action=\"uploadServlet\" method=\"POST\" enctype=\"multipart/form-data\">"); <input type=\"file\" id=\"browseBox\" name=\"file1\"/> <input type=\"submit\" id=\"uploadButton\"/> </form> jQuery: $("#myForm").submit(upload); $("#myForm").ajaxForm(); function upload() { var options = { async: false, success: uploadSuccessful, error: uploadError } $("#myForm").ajaxSubmit(options); return false; } function uploadSuccessful(data) { alert(data); } function uploadError(jqXHR, textStatus, err) { alert(jqXHR.responseText); } Like I mentioned jqXHR is empty in IE8, but not so in FF. The servlet responds with plain text that I display to the user. Any ideas why IE8 specifically fails at getting the response from my servlet ?
0
11,226,500
06/27/2012 12:43:21
1,485,646
06/27/2012 12:33:01
1
0
Python debug print the command
Folks I am not very up with Python but have inherited a load of Python scripts One of which is given me a issue in that I am not 100% sure what one line is running What I need to do is print out the command line and its varables. The line in question is<p> ldapModify(userdn, mods, uri=uri) What I am hoping to see is something like <p> /usr/bin/ldapmodify xxxx cn=...... Can any kind sole help.
python
debug-symbols
null
null
null
null
open
Python debug print the command === Folks I am not very up with Python but have inherited a load of Python scripts One of which is given me a issue in that I am not 100% sure what one line is running What I need to do is print out the command line and its varables. The line in question is<p> ldapModify(userdn, mods, uri=uri) What I am hoping to see is something like <p> /usr/bin/ldapmodify xxxx cn=...... Can any kind sole help.
0
11,226,504
06/27/2012 12:43:28
1,293,335
03/26/2012 15:04:14
1
1
Drupal Webform textfield dynamic growing list
Just curious... I have a project where people can input their cooking recipes. I would like to build a webform that will have a textfield and when it is filled in a new textfield appears below. A "growing textfield list". Let me try to show it here: Ingredient #1 _________________________________ [add] When you type and ingredient click "add" you then are going to see: Ingredient #1 Potatoes_________________________ Ingredient #2 _________________________________ [add] Sorry for not knowing the proper markup. However if anyone knows: a) the proper term for this ( I call a growing textfield list )? b) how to do it with webform in drupal?
drupal
dynamic
webforms
null
null
null
open
Drupal Webform textfield dynamic growing list === Just curious... I have a project where people can input their cooking recipes. I would like to build a webform that will have a textfield and when it is filled in a new textfield appears below. A "growing textfield list". Let me try to show it here: Ingredient #1 _________________________________ [add] When you type and ingredient click "add" you then are going to see: Ingredient #1 Potatoes_________________________ Ingredient #2 _________________________________ [add] Sorry for not knowing the proper markup. However if anyone knows: a) the proper term for this ( I call a growing textfield list )? b) how to do it with webform in drupal?
0
11,226,495
06/27/2012 12:42:57
1,423,818
05/29/2012 13:40:55
10
1
Access session in servlet applet communication
I have session problem in developing the servlet applet communication program. I have login page in jsp after successful login of user i am guiding the user to a index.jsp page which has an applet. I have set a session variable in servlet before redirecting to index.jsp. In my applet i have to get the data stetted in session and some data from databse and properties file. my code is<br> //Servlet if(action.equals("login")){ uinfo = new UserInformation(); String uid = request.getParameter("txt_UserName"); String pwd = request.getParameter("pwd_PassWord"); int i = uinfo.authenticateUser(uid, pwd); //System.out.println(i); if(i==1){ session.setAttribute("uName", uid); request.getRequestDispatcher("index.jsp").forward(request, response); else if(action.equals("applet")){ try{ output = new ObjectOutputStream(response.getOutputStream()); uinfob= new UserInformationBean(); Properties prop = new Properties(); try { prop.load(new FileInputStream(path+"/connection.properties")); } catch (IOException ex) { ex.printStackTrace(); } uinfob.setHost(prop.getProperty("host")); uinfob.setIs_Active("Y"); uinfob.setUid(session.getAttribute("uName").toString()); output.writeObject(uinfob); output.flush(); //output.close(); }catch(IOException iox){ iox.printStackTrace(); }catch(Exception e){ e.printStackTrace(); }finally{ output.close(); } } In my applet public void init() { try{ String queryString="action=applet"; URL codeBase = getCodeBase(); URL servletURL = new URL(codeBase.getProtocol(), codeBase.getHost(), codeBase.getPort(), "/SwingBrowser1/UserServlet?"+queryString); servletConnection = servletURL.openConnection(); servletConnection.setDoInput(true); servletConnection.setDoOutput(true); servletConnection.setUseCaches(false); servletConnection.setDefaultUseCaches(false); servletConnection.setRequestProperty("Content-Type","application/octet-stream"); getData(); }catch(Exception e){ e.printStackTrace(); } } // TODO overwrite start(), stop() and destroy() methods public void getData() { try{ ObjectInputStream input = new ObjectInputStream(servletConnection.getInputStream()); UserInformationBean uib =(UserInformationBean)input.readObject(); System.out.println(uib.getHost()+"-------------"+uib.getIs_Active()+"-----------------"+uib.getUid()); input.close(); } catch( Exception e) { e.printStackTrace(); } It is getting java.io.EOFException error and i tested this with a sop in my else block of servlet. The attribute which i set before is returning null value.
java
java-ee
servlets
applet
null
null
open
Access session in servlet applet communication === I have session problem in developing the servlet applet communication program. I have login page in jsp after successful login of user i am guiding the user to a index.jsp page which has an applet. I have set a session variable in servlet before redirecting to index.jsp. In my applet i have to get the data stetted in session and some data from databse and properties file. my code is<br> //Servlet if(action.equals("login")){ uinfo = new UserInformation(); String uid = request.getParameter("txt_UserName"); String pwd = request.getParameter("pwd_PassWord"); int i = uinfo.authenticateUser(uid, pwd); //System.out.println(i); if(i==1){ session.setAttribute("uName", uid); request.getRequestDispatcher("index.jsp").forward(request, response); else if(action.equals("applet")){ try{ output = new ObjectOutputStream(response.getOutputStream()); uinfob= new UserInformationBean(); Properties prop = new Properties(); try { prop.load(new FileInputStream(path+"/connection.properties")); } catch (IOException ex) { ex.printStackTrace(); } uinfob.setHost(prop.getProperty("host")); uinfob.setIs_Active("Y"); uinfob.setUid(session.getAttribute("uName").toString()); output.writeObject(uinfob); output.flush(); //output.close(); }catch(IOException iox){ iox.printStackTrace(); }catch(Exception e){ e.printStackTrace(); }finally{ output.close(); } } In my applet public void init() { try{ String queryString="action=applet"; URL codeBase = getCodeBase(); URL servletURL = new URL(codeBase.getProtocol(), codeBase.getHost(), codeBase.getPort(), "/SwingBrowser1/UserServlet?"+queryString); servletConnection = servletURL.openConnection(); servletConnection.setDoInput(true); servletConnection.setDoOutput(true); servletConnection.setUseCaches(false); servletConnection.setDefaultUseCaches(false); servletConnection.setRequestProperty("Content-Type","application/octet-stream"); getData(); }catch(Exception e){ e.printStackTrace(); } } // TODO overwrite start(), stop() and destroy() methods public void getData() { try{ ObjectInputStream input = new ObjectInputStream(servletConnection.getInputStream()); UserInformationBean uib =(UserInformationBean)input.readObject(); System.out.println(uib.getHost()+"-------------"+uib.getIs_Active()+"-----------------"+uib.getUid()); input.close(); } catch( Exception e) { e.printStackTrace(); } It is getting java.io.EOFException error and i tested this with a sop in my else block of servlet. The attribute which i set before is returning null value.
0
11,226,555
06/27/2012 12:46:25
1,010,965
10/24/2011 13:41:51
11
4
Launching different service host with the same contract fails
I'm trying to write a generic host process (WinForm) which host different WCF Service implementation of the same contract. When I run the first one it works OK, but when I launch the other one (in parallel) with a different address is throws that I use the same address twice (addr and port) -> path is different though.. private bool InitializeServiceHost() { bool isInitialized = true; try { Log.InfoFormat("Loading service DLL {0} and class {1}", _dllPath, _serviceClassName); var asm = Assembly.LoadFile(_dllPath); _service = (IGfnService) asm.CreateInstance(_serviceClassName); if (_service == null) throw new ApplicationException(string.Format("Could not instansiate {0} from DLL {1}", _serviceClassName, _dllPath)); _service.Init(_myGuidStr); Uri uri = new Uri("net.tcp://localhost:9085/GfnService/" + _myGuidStr); var host = new ServiceHost(_service, uri); Log.InfoFormat("About to open host, State: {0}, URI: {1} ", host.State, uri); host.Open(); _serviceUri = uri.ToString(); Log.InfoFormat("Gfn service started successfully, State: {0}, URI: {1} ", host.State, uri); } catch (Exception ex) { Log.Error(ex.Message, ex); isInitialized = false; Application.Exit(); } return isInitialized; } Any help will be appreciated....
wcf
null
null
null
null
null
open
Launching different service host with the same contract fails === I'm trying to write a generic host process (WinForm) which host different WCF Service implementation of the same contract. When I run the first one it works OK, but when I launch the other one (in parallel) with a different address is throws that I use the same address twice (addr and port) -> path is different though.. private bool InitializeServiceHost() { bool isInitialized = true; try { Log.InfoFormat("Loading service DLL {0} and class {1}", _dllPath, _serviceClassName); var asm = Assembly.LoadFile(_dllPath); _service = (IGfnService) asm.CreateInstance(_serviceClassName); if (_service == null) throw new ApplicationException(string.Format("Could not instansiate {0} from DLL {1}", _serviceClassName, _dllPath)); _service.Init(_myGuidStr); Uri uri = new Uri("net.tcp://localhost:9085/GfnService/" + _myGuidStr); var host = new ServiceHost(_service, uri); Log.InfoFormat("About to open host, State: {0}, URI: {1} ", host.State, uri); host.Open(); _serviceUri = uri.ToString(); Log.InfoFormat("Gfn service started successfully, State: {0}, URI: {1} ", host.State, uri); } catch (Exception ex) { Log.Error(ex.Message, ex); isInitialized = false; Application.Exit(); } return isInitialized; } Any help will be appreciated....
0
11,226,546
06/27/2012 12:45:58
1,485,635
06/27/2012 12:30:03
1
0
Facebook API - How can I store multiple access tokens without the user to need to log in again?
For my application, I need to be able to get some datas from 0-x FB accounts for each person. I have the authentication process working, I get the different access tokens, but they become invalid very quickly because, when the user logs in as a different account, the token from the previous one becomes invalid. Problem is, I need to get the datas I want all at the same time, so I can't ask them to login with their multiple accounts each time they come on the website... If anyone has an idea... Thanks for your help =)
php
facebook
null
null
null
null
open
Facebook API - How can I store multiple access tokens without the user to need to log in again? === For my application, I need to be able to get some datas from 0-x FB accounts for each person. I have the authentication process working, I get the different access tokens, but they become invalid very quickly because, when the user logs in as a different account, the token from the previous one becomes invalid. Problem is, I need to get the datas I want all at the same time, so I can't ask them to login with their multiple accounts each time they come on the website... If anyone has an idea... Thanks for your help =)
0
11,226,561
06/27/2012 12:46:56
1,485,611
06/27/2012 12:21:50
1
0
Error - invalid use of incomplete type / forward declaration of
My problem is pretty common I know but I've been searching and trying every solutions I found and still does not work. So any help would be greatly appreciated! =) Thanks in advance! I have this error at compilation : g++ -ISFML/include -Iclasses/ -W -Wall -Werror -c -o classes/Object.o classes/Object.cpp In file included from classes/Core.hh:18:0, from classes/Object.hh:4, from classes/Object.cpp:1: classes/MapLink.hh:9:1: error: invalid use of incomplete type ‘struct Object’ classes/MapLink.hh:6:7: error: forward declaration of ‘struct Object’ In file included from classes/Core.hh:19:0, from classes/Object.hh:4, from classes/Object.cpp:1: classes/Player.hh:9:1: error: invalid use of incomplete type ‘struct Object’ classes/MapLink.hh:6:7: error: forward declaration of ‘struct Object’ make: *** [classes/Object.o] Error 1 So basically, I've got a main containing (main.cpp) #include "Core.hh" int main(void) { ... } Here's the header file containing all my includes (Core.hh) #ifndef __CORE_HH__ # define __CORE_HH__ #include ... #include "Object.hh" #include "MapLink.hh" #include "Player.hh" class Core { ... }; #endif /* __CORE_HH__ */ And then the files that are causing me troubles (Object.hh) #ifndef __OBJECT_HH__ # define __OBJECT_HH__ #include "Core.hh" class Object { ... }; #endif /* __OBJECT_HH__ */ (MapLink.hh) ifndef __MAPLINK_H__ # define __MAPLINK_H__ #include "Core.hh" class Object; class MapLink : public Object { ... }; #endif /* __MAPLINK_H__ */ (Player.hh) #ifndef __PLAYER_H__ # define __PLAYER_H__ #include "Core.hh" class Object; class Player : public Object { ... }; #endif /* __PLAYER_H__ */
c++
inheritance
compiler-errors
g++
null
null
open
Error - invalid use of incomplete type / forward declaration of === My problem is pretty common I know but I've been searching and trying every solutions I found and still does not work. So any help would be greatly appreciated! =) Thanks in advance! I have this error at compilation : g++ -ISFML/include -Iclasses/ -W -Wall -Werror -c -o classes/Object.o classes/Object.cpp In file included from classes/Core.hh:18:0, from classes/Object.hh:4, from classes/Object.cpp:1: classes/MapLink.hh:9:1: error: invalid use of incomplete type ‘struct Object’ classes/MapLink.hh:6:7: error: forward declaration of ‘struct Object’ In file included from classes/Core.hh:19:0, from classes/Object.hh:4, from classes/Object.cpp:1: classes/Player.hh:9:1: error: invalid use of incomplete type ‘struct Object’ classes/MapLink.hh:6:7: error: forward declaration of ‘struct Object’ make: *** [classes/Object.o] Error 1 So basically, I've got a main containing (main.cpp) #include "Core.hh" int main(void) { ... } Here's the header file containing all my includes (Core.hh) #ifndef __CORE_HH__ # define __CORE_HH__ #include ... #include "Object.hh" #include "MapLink.hh" #include "Player.hh" class Core { ... }; #endif /* __CORE_HH__ */ And then the files that are causing me troubles (Object.hh) #ifndef __OBJECT_HH__ # define __OBJECT_HH__ #include "Core.hh" class Object { ... }; #endif /* __OBJECT_HH__ */ (MapLink.hh) ifndef __MAPLINK_H__ # define __MAPLINK_H__ #include "Core.hh" class Object; class MapLink : public Object { ... }; #endif /* __MAPLINK_H__ */ (Player.hh) #ifndef __PLAYER_H__ # define __PLAYER_H__ #include "Core.hh" class Object; class Player : public Object { ... }; #endif /* __PLAYER_H__ */
0
11,226,562
06/27/2012 12:46:58
126,483
06/21/2009 13:47:02
1,856
10
Handle failure in CQRS between domain and reporting databases on single node?
First some context, I have a licensing domain where I can allocate licenses that activate certain services on the network. All this information is stored in my central domain database. Using CQRS events are raised and written in a reporting database which is on the same machine as the domain database. No say a user has an allocation of 10 licenses and he uses 3 but for some reason my reporting database is not updated (connection with the database failed when writing although I attempted it several times). Now the user sees stale data (say connection is fine now), and thinks he still has 10 licenses and applies another 3. Lets say that there is still an issue with my reporting database when writing data. Now what could I do prevent the user from issuing the second update which is based on stale data?
domain-driven-design
cqrs
null
null
null
null
open
Handle failure in CQRS between domain and reporting databases on single node? === First some context, I have a licensing domain where I can allocate licenses that activate certain services on the network. All this information is stored in my central domain database. Using CQRS events are raised and written in a reporting database which is on the same machine as the domain database. No say a user has an allocation of 10 licenses and he uses 3 but for some reason my reporting database is not updated (connection with the database failed when writing although I attempted it several times). Now the user sees stale data (say connection is fine now), and thinks he still has 10 licenses and applies another 3. Lets say that there is still an issue with my reporting database when writing data. Now what could I do prevent the user from issuing the second update which is based on stale data?
0
11,386,901
07/08/2012 21:34:48
634,135
02/25/2011 12:42:35
901
45
Why does chibi-scheme throw this error
I get an ERROR on line 11 of file project_euler.scm: empty application in source: () whenever I run this code below using chibi-scheme v 0.5.3 but it just runs fine when I use Dr Racket. Has anyone got any idea why this is happening? #! /usr/bin/env chibi-scheme (define (sum-of-amicable-pairs n) (let ((sums (list->vector (map (lambda (i) (reduce + 0 (filter (lambda (j) (= (remainder i j) 0)) (iota (+ 1 (quotient i 2)) 1 1)))) (iota n 0 1))))) (let loop ((len (vector-length sums)) (res-list '()) (i 0)) (cond ((= i len) (reduce + 0 res-list)) ((and (< (vector-ref sums i) n) (or (> (vector-ref sums i) i) (< (vector-ref sums i) i)) (= (vector-ref sums (vector-ref sums i)) i)) (loop len (cons (+ (vector-ref sums i) (vector-ref sums (vector-ref sums i))) res-list) (+ i 1))) (else (loop len res-list (+ i 1))))))) (sum-of-amicable-pairs 10000)
scheme
null
null
null
null
null
open
Why does chibi-scheme throw this error === I get an ERROR on line 11 of file project_euler.scm: empty application in source: () whenever I run this code below using chibi-scheme v 0.5.3 but it just runs fine when I use Dr Racket. Has anyone got any idea why this is happening? #! /usr/bin/env chibi-scheme (define (sum-of-amicable-pairs n) (let ((sums (list->vector (map (lambda (i) (reduce + 0 (filter (lambda (j) (= (remainder i j) 0)) (iota (+ 1 (quotient i 2)) 1 1)))) (iota n 0 1))))) (let loop ((len (vector-length sums)) (res-list '()) (i 0)) (cond ((= i len) (reduce + 0 res-list)) ((and (< (vector-ref sums i) n) (or (> (vector-ref sums i) i) (< (vector-ref sums i) i)) (= (vector-ref sums (vector-ref sums i)) i)) (loop len (cons (+ (vector-ref sums i) (vector-ref sums (vector-ref sums i))) res-list) (+ i 1))) (else (loop len res-list (+ i 1))))))) (sum-of-amicable-pairs 10000)
0
11,386,918
07/08/2012 21:36:17
491,216
10/29/2010 11:16:25
712
19
Mutable MultiMap to immutable Map
I create a ``MultiMap`` val ms = new collection.mutable.HashMap[String, collection.mutable.Set[String]]() with collection.mutable.MultiMap[String, String] which, after it has been populated with entries, must be passed to a function that expects a ``Map[String, Set[String]]``. Passing ``ms`` directly doesn't work, and trying to convert it into a immutable map via ``toMap`` ms.toMap[String, Set[String]] yields Cannot prove that (String, scala.collection.mutable.Set[String]) <:< (String, Set[String]). Can this be solved without manually iterating over ``ms`` and inserting all entries into a new immutable map?
scala
map
set
immutable
multimap
null
open
Mutable MultiMap to immutable Map === I create a ``MultiMap`` val ms = new collection.mutable.HashMap[String, collection.mutable.Set[String]]() with collection.mutable.MultiMap[String, String] which, after it has been populated with entries, must be passed to a function that expects a ``Map[String, Set[String]]``. Passing ``ms`` directly doesn't work, and trying to convert it into a immutable map via ``toMap`` ms.toMap[String, Set[String]] yields Cannot prove that (String, scala.collection.mutable.Set[String]) <:< (String, Set[String]). Can this be solved without manually iterating over ``ms`` and inserting all entries into a new immutable map?
0
11,386,898
07/08/2012 21:34:42
1,430,871
06/01/2012 14:05:07
1
0
XUL, javascript file not linked
My XUL application has an external javascript file which defines some functions. These functions were previously working, but now I can't call any of these functions from within the .xul file. Can anyone see what I've done wrong? Here's the chrome.manifest file content mac chrome/content/ skin mac classic/1.0 chrome/skin/ Here's the very top of my main.xul file <?xml version="1.0"?> <?xml-stylesheet href="chrome://mac/skin/main.css" type="text/css"?> <window id="mac-window" title="MAC" persist="screenX screenY width height sizemode" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript" src="chrome://mac/content/main.js"/> Note that the css file referenced at the top of the file works fine. Also, I've tried changing the "text/javascript" to "application/x-javascript" with no effect. Here's the entire contents of the javascript file: function exit() { window.close(); } function toggle_toolbar(menuitem, toolbar) { switch (menuitem.getAttribute("checked")) { case "true": menuitem.setAttribute("checked", "false"); toolbar.hidden = true; break; case "false"; menuitem.setAttribute("checked", "true"); toolbar.hidden = false; break; } } These functions get called like this: <commandset id="cmdset-file"> <command id="cmd-toolbar" oncommand="toggle_toolbar(document.getElementById('view-popup-toolbar'), document.getElementById('the-toolbar'));"/> <command id="cmd-exit" oncommand="exit();"/> </commandset> And two menuitems have the command attribute set to the id of these two commands. Javascript put inline in the XUL file work properly, but it seems as if the javascript file cannot be referenced. This worked perfectly fine earlier today. Before this stopped working, I was experimenting with some javascript to hide/un-hide some tabboxes, but I'm not sure if that's related or not. Does anyone see why my javascript file has stopped working? Thanks in advance!
javascript
xul
null
null
null
null
open
XUL, javascript file not linked === My XUL application has an external javascript file which defines some functions. These functions were previously working, but now I can't call any of these functions from within the .xul file. Can anyone see what I've done wrong? Here's the chrome.manifest file content mac chrome/content/ skin mac classic/1.0 chrome/skin/ Here's the very top of my main.xul file <?xml version="1.0"?> <?xml-stylesheet href="chrome://mac/skin/main.css" type="text/css"?> <window id="mac-window" title="MAC" persist="screenX screenY width height sizemode" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript" src="chrome://mac/content/main.js"/> Note that the css file referenced at the top of the file works fine. Also, I've tried changing the "text/javascript" to "application/x-javascript" with no effect. Here's the entire contents of the javascript file: function exit() { window.close(); } function toggle_toolbar(menuitem, toolbar) { switch (menuitem.getAttribute("checked")) { case "true": menuitem.setAttribute("checked", "false"); toolbar.hidden = true; break; case "false"; menuitem.setAttribute("checked", "true"); toolbar.hidden = false; break; } } These functions get called like this: <commandset id="cmdset-file"> <command id="cmd-toolbar" oncommand="toggle_toolbar(document.getElementById('view-popup-toolbar'), document.getElementById('the-toolbar'));"/> <command id="cmd-exit" oncommand="exit();"/> </commandset> And two menuitems have the command attribute set to the id of these two commands. Javascript put inline in the XUL file work properly, but it seems as if the javascript file cannot be referenced. This worked perfectly fine earlier today. Before this stopped working, I was experimenting with some javascript to hide/un-hide some tabboxes, but I'm not sure if that's related or not. Does anyone see why my javascript file has stopped working? Thanks in advance!
0
11,386,922
07/08/2012 21:37:06
898,247
08/17/2011 08:38:08
40
2
Solr can't find resource stopwords_en.txt
I'm trying to setup Solr 3.6.0 with Django-haystack Beta 2.0.0. After running `./manage.py build_solr_schema` and moving schema.xml to the conf directory, upon visiting `http://localhost:8983/solr/admin`, I receive an error exactly like the one produced in [this thread](http://lucene.472066.n3.nabble.com/solr-error-after-relacing-schema-xml-td3940133.html). `org.apache.solr.common.SolrException: No cores were created, please check the logs for errors` `java.lang.RuntimeException: Can't find resource 'stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example` At the bottom of the thread, a user mentions that schema.xml must be edited to match stopwords_en.txt to the /example/solr/conf/ directory, which I did both through a symbolic link and by editing all instances of stopwords.txt to /solr/conf/stopwords_en.txt in the generated schema.xml file. However, the same error persists, giving a slightly different output: `java.lang.RuntimeException: Can't find resource '/solr/conf/stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example` What file must I edit to fix this problem?
solr
django-haystack
null
null
null
null
open
Solr can't find resource stopwords_en.txt === I'm trying to setup Solr 3.6.0 with Django-haystack Beta 2.0.0. After running `./manage.py build_solr_schema` and moving schema.xml to the conf directory, upon visiting `http://localhost:8983/solr/admin`, I receive an error exactly like the one produced in [this thread](http://lucene.472066.n3.nabble.com/solr-error-after-relacing-schema-xml-td3940133.html). `org.apache.solr.common.SolrException: No cores were created, please check the logs for errors` `java.lang.RuntimeException: Can't find resource 'stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example` At the bottom of the thread, a user mentions that schema.xml must be edited to match stopwords_en.txt to the /example/solr/conf/ directory, which I did both through a symbolic link and by editing all instances of stopwords.txt to /solr/conf/stopwords_en.txt in the generated schema.xml file. However, the same error persists, giving a slightly different output: `java.lang.RuntimeException: Can't find resource '/solr/conf/stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example` What file must I edit to fix this problem?
0
11,386,771
07/08/2012 21:16:17
1,483,441
06/26/2012 16:46:51
19
0
Why does my signup form in rails no longer work when this small snippet of code is added to it?
Originally, for a signup form on my site, I had this code for the beginning of the form: <%= form_for(@user) do |f| %> When I add this html id in the following code for the beginning of my form: <%= form_for(@user, :html => { :id => 'payment-form' }) do |f| %> The form no longer works. Is there a way to still add the html id I specified above to my form while allowing my form to work? How can I go about doing that? Why doesn't the form actually process when I hit 'submit' after I add the html id. Thanks so much!
html
ruby-on-rails
null
null
null
null
open
Why does my signup form in rails no longer work when this small snippet of code is added to it? === Originally, for a signup form on my site, I had this code for the beginning of the form: <%= form_for(@user) do |f| %> When I add this html id in the following code for the beginning of my form: <%= form_for(@user, :html => { :id => 'payment-form' }) do |f| %> The form no longer works. Is there a way to still add the html id I specified above to my form while allowing my form to work? How can I go about doing that? Why doesn't the form actually process when I hit 'submit' after I add the html id. Thanks so much!
0
11,471,473
07/13/2012 13:28:32
1,371,080
05/02/2012 21:02:03
28
1
Attach to external c++ process from java process causing issue
I am trying to attach with C++ executable using java.lang.process. The code to build the exec is as under: int main(int, char**){ std::cout << "Starting Up. . . . . " << std::endl; std::string command; while (command != "exit") { std::cin >> command; } return 0; } While debugging, I found during creation time of process, the process halt on std::cin and expect the value to be entered, but on next iteration it takes the previous 'command' std::cin value automatically and go on iterating the 'while' loop without getting the control back to java process. Why the c++ executable doestnt halt at std::cin at each iteration? Please let me know if any problem with description. Thanks, Tor.
java
null
null
null
null
null
open
Attach to external c++ process from java process causing issue === I am trying to attach with C++ executable using java.lang.process. The code to build the exec is as under: int main(int, char**){ std::cout << "Starting Up. . . . . " << std::endl; std::string command; while (command != "exit") { std::cin >> command; } return 0; } While debugging, I found during creation time of process, the process halt on std::cin and expect the value to be entered, but on next iteration it takes the previous 'command' std::cin value automatically and go on iterating the 'while' loop without getting the control back to java process. Why the c++ executable doestnt halt at std::cin at each iteration? Please let me know if any problem with description. Thanks, Tor.
0
11,471,517
07/13/2012 13:31:25
1,065,365
11/25/2011 09:49:22
342
15
create setup asp.net website with editable config file
I want to create setup of my web application with editable web.config file content can any one help me on it. Thanks in advance.
c#
asp.net
setup
null
null
null
open
create setup asp.net website with editable config file === I want to create setup of my web application with editable web.config file content can any one help me on it. Thanks in advance.
0
11,471,518
07/13/2012 13:31:31
773,690
05/27/2011 20:08:26
3,155
139
Implicit return value of Array#map in Ruby
Given the following code: class MagicList def items=(array) @items = array.map{|x| x*2} end def items @items end end list = MagicList.new returns = list.items=([1, 2, 3]) puts returns.inspect # => [1, 2, 3] puts list.items.inspect # => [2, 4, 6] I expected the value of `returns` to be `[2, 4, 6]`, because `@items` as well as `array.map{|x| x*2}` both return this value. Why is it `[1, 2, 3]`?
ruby
null
null
null
null
null
open
Implicit return value of Array#map in Ruby === Given the following code: class MagicList def items=(array) @items = array.map{|x| x*2} end def items @items end end list = MagicList.new returns = list.items=([1, 2, 3]) puts returns.inspect # => [1, 2, 3] puts list.items.inspect # => [2, 4, 6] I expected the value of `returns` to be `[2, 4, 6]`, because `@items` as well as `array.map{|x| x*2}` both return this value. Why is it `[1, 2, 3]`?
0
11,471,519
07/13/2012 13:31:35
399,145
07/22/2010 13:40:20
1,061
5
How to get registryKey name alone instead of full registry keypath?
I was trying to get all the sub registry keys from registry key $Key="hklm:\SOFTWARE\Wow6432Node\Honeywell\MES" $ComponentKeys=Get-ChildItem -path $Key $ComponentName=$Components | Select-object Name $ComponentName It displays the result like below Name ---- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Service HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\UserInterface HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\DataSetView HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Notification HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Model HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Management But I just would like to retrieve the subkey name not the full name. I need result like below Name ---- Service UserInterface DataSetView Notification Model Management How to get the key name alone?
powershell
registry
powershell-v2.0
null
null
null
open
How to get registryKey name alone instead of full registry keypath? === I was trying to get all the sub registry keys from registry key $Key="hklm:\SOFTWARE\Wow6432Node\Honeywell\MES" $ComponentKeys=Get-ChildItem -path $Key $ComponentName=$Components | Select-object Name $ComponentName It displays the result like below Name ---- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Service HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\UserInterface HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\DataSetView HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Notification HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Model HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyCompany\MyProj\Management But I just would like to retrieve the subkey name not the full name. I need result like below Name ---- Service UserInterface DataSetView Notification Model Management How to get the key name alone?
0
11,471,521
07/13/2012 13:31:39
613,143
02/11/2011 13:58:16
20
1
Crystal Reports to Fast Reports conversion
It looks like Fast Reports recently released a conversion tool to transfer Crystal Reports to Fast Reports format. We are looking at changing over all of our reports. (Some simple and some incredibly complex). I looked but havent been able to find any reviews of the conversion tool so far. So I turn to you guys. Has anyone used the conversion tool? and if so, How was the conversion? How close was the fast report to the crystal report? Any info would be helpful
crystal-reports
fastreport
null
null
null
null
open
Crystal Reports to Fast Reports conversion === It looks like Fast Reports recently released a conversion tool to transfer Crystal Reports to Fast Reports format. We are looking at changing over all of our reports. (Some simple and some incredibly complex). I looked but havent been able to find any reviews of the conversion tool so far. So I turn to you guys. Has anyone used the conversion tool? and if so, How was the conversion? How close was the fast report to the crystal report? Any info would be helpful
0
11,471,528
07/13/2012 13:32:03
1,140,579
01/10/2012 10:09:45
15,921
609
Handle the incoming emails using vbscript
**Problem**: Handle the incoming emails using vbscript. **Outlook Version**: Outlook 2000 **Description**: I cannot use VBA for this as I believe Outlook 2000 doesn't let you run a VBA script from the rules wizard and hence I have to use the `Run a Program | VBScript` method. **What I know**: I know how to handle email from VBA like this Sub Sample(MyMail As MailItem) Dim strID As String, olNS As Outlook.NameSpace Dim olMail As Outlook.MailItem strID = MyMail.EntryID Set olNS = Application.GetNamespace("MAPI") Set olMail = olNS.GetItemFromID(strID) '~~> Rest of the code Set olMail = Nothing Set olNS = Nothing End Sub I also know how to run the vbscript on the email which is **already in** the inbox **What I do not know**: And this is where I need help. How to get the mail object which has not hit the mail inbox in VBS. Once I get the object then I can do the rest of the necessary operations.
vbscript
outlook
null
null
null
null
open
Handle the incoming emails using vbscript === **Problem**: Handle the incoming emails using vbscript. **Outlook Version**: Outlook 2000 **Description**: I cannot use VBA for this as I believe Outlook 2000 doesn't let you run a VBA script from the rules wizard and hence I have to use the `Run a Program | VBScript` method. **What I know**: I know how to handle email from VBA like this Sub Sample(MyMail As MailItem) Dim strID As String, olNS As Outlook.NameSpace Dim olMail As Outlook.MailItem strID = MyMail.EntryID Set olNS = Application.GetNamespace("MAPI") Set olMail = olNS.GetItemFromID(strID) '~~> Rest of the code Set olMail = Nothing Set olNS = Nothing End Sub I also know how to run the vbscript on the email which is **already in** the inbox **What I do not know**: And this is where I need help. How to get the mail object which has not hit the mail inbox in VBS. Once I get the object then I can do the rest of the necessary operations.
0
11,471,529
07/13/2012 13:32:21
1,467,409
06/19/2012 19:35:11
1
0
Dynamic html page navigation
Ok, I saw this tutorial [http://css-tricks.com/dynamic-page-replacing-content/][1], pretty cool actually! My problem is as flows, I have a page that not only has contents but also specific javascript content, and css. Is there a way to load those files dynamically, would It be correct? What if I have a hard written code on the page, how would I load that css/js script? Thanks in advance. [1]: http://css-tricks.com/dynamic-page-replacing-content/
javascript
jquery
html
dynamic
web
null
open
Dynamic html page navigation === Ok, I saw this tutorial [http://css-tricks.com/dynamic-page-replacing-content/][1], pretty cool actually! My problem is as flows, I have a page that not only has contents but also specific javascript content, and css. Is there a way to load those files dynamically, would It be correct? What if I have a hard written code on the page, how would I load that css/js script? Thanks in advance. [1]: http://css-tricks.com/dynamic-page-replacing-content/
0
11,471,323
07/13/2012 13:19:14
1,521,804
07/12/2012 19:13:38
1
0
find_obj.cpp is rotational variant opencv
Hey i tried using SURF to match 2 images so i used find_obj.cpp from opencv samples. but what i saw that if i rotate the image, it does not find it but if the image is rotated by 180 deg i.e.m upside down it is able to detect but even a small rotation on about 10deg makes it loose recognition.. please help.. to check just rotate ur box.png by 90deg and then run ur prog.. u will not be able to find it.. my sorce code : void flannFindPairs(const CvSeq*, const CvSeq* objectDescriptors, const CvSeq*, const CvSeq* imageDescriptors, vector<int>& ptpairs ){ int length = (int)(objectDescriptors->elem_size/sizeof(float)); cv::Mat m_object(objectDescriptors->total, length, CV_32F); cv::Mat m_image(imageDescriptors->total, length, CV_32F); // copy descriptors CvSeqReader obj_reader; float* obj_ptr = m_object.ptr<float>(0); cvStartReadSeq( objectDescriptors, &obj_reader ); for(int i = 0; i < objectDescriptors->total; i++ ) { const float* descriptor = (const float*)obj_reader.ptr; CV_NEXT_SEQ_ELEM( obj_reader.seq->elem_size, obj_reader ); memcpy(obj_ptr, descriptor, length*sizeof(float)); obj_ptr += length; } CvSeqReader img_reader; float* img_ptr = m_image.ptr<float>(0); cvStartReadSeq( imageDescriptors, &img_reader ); for(int i = 0; i < imageDescriptors->total; i++ ) { const float* descriptor = (const float*)img_reader.ptr; CV_NEXT_SEQ_ELEM( img_reader.seq->elem_size, img_reader ); memcpy(img_ptr, descriptor, length*sizeof(float)); img_ptr += length; } // find nearest neighbors using FLANN cv::Mat m_indices(objectDescriptors->total, 2, CV_32S); cv::Mat m_dists(objectDescriptors->total, 2, CV_32F); cv::flann::Index flann_index(m_image, cv::flann::KDTreeIndexParams(4)); // using 4 randomized kdtrees flann_index.knnSearch(m_object, m_indices, m_dists, 2, cv::flann::SearchParams(64) ); // maximum number of leafs checked int* indices_ptr = m_indices.ptr<int>(0); float* dists_ptr = m_dists.ptr<float>(0); for (int i=0;i<m_indices.rows;++i) { if (dists_ptr[2*i]<0.8*dists_ptr[2*i+1]) { ptpairs.push_back(i); ptpairs.push_back(indices_ptr[2*i]); } } } int locatePlanarObject( const CvSeq* objectKeypoints, const CvSeq* objectDescriptors, const CvSeq* imageKeypoints, const CvSeq* imageDescriptors, const CvPoint src_corners[4], CvPoint dst_corners[4] ) { vector<int> ptpairs; vector<CvPoint2D32f> pt1, pt2; CvMat _pt1, _pt2; int i, n; flannFindPairs( objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors, ptpairs ); n = (int)(ptpairs.size()/2); if( n < 4 ){ return 0; } pt1.resize(n); pt2.resize(n); for( i = 0; i < n; i++ ) { pt1[i] = ((CvSURFPoint*)cvGetSeqElem(objectKeypoints,ptpairs[i*2]))->pt; pt2[i] = ((CvSURFPoint*)cvGetSeqElem(imageKeypoints,ptpairs[i*2+1]))->pt; } _pt1 = cvMat(1, n, CV_32FC2, &pt1[0] ); _pt2 = cvMat(1, n, CV_32FC2, &pt2[0] ); if( !cvFindHomography( &_pt1, &_pt2, &_h, CV_RANSAC,3 )){ flag=0; return 0; } for( i = 0; i < 4; i++ ) { double x = src_corners[i].x, y = src_corners[i].y; double Z = 1./(h[6]*x + h[7]*y + h[8]); double X = (h[0]*x + h[1]*y + h[2])*Z; double Y = (h[3]*x + h[4]*y + h[5])*Z; dst_corners[i] = cvPoint(cvRound(X), cvRound(Y)); flag=1; } return 1; } int main( ) { cv::initModule_nonfree(); IplImage* object = cvLoadImage( "c:\\users\\u7karsh\\desktop\\marker.png", CV_LOAD_IMAGE_GRAYSCALE ); IplImage* image,*frame; CvCapture *capture; capture = cvCaptureFromCAM(0); CvMemStorage* storage = cvCreateMemStorage(0); cvNamedWindow("u7karsh", 1); while(true) { frame = cvQueryFrame(capture); image = cvCreateImage(cvGetSize(frame),8,1); cvCvtColor(frame,image,CV_BGR2GRAY); CvSeq* objectKeypoints = 0, *objectDescriptors = 0; CvSeq* imageKeypoints = 0, *imageDescriptors = 0; int i; CvSURFParams params = cvSURFParams(300,0); cvExtractSURF( object, 0, &objectKeypoints, &objectDescriptors, storage, params); cvExtractSURF( image, 0, &imageKeypoints, &imageDescriptors, storage, params); CvPoint src_corners[4] = {{0,0}, {object->width,0}, {object->width, object->height}, {0, object->height}}; CvPoint dst_corners[4]; IplImage* correspond = cvCreateImage( cvGetSize(image), 8, 3 ); cvCvtColor(image,correspond,CV_GRAY2RGB); if(locatePlanarObject( objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors, src_corners, dst_corners )){ if(0){//check(dst_corners,10,10)){ for( i = 0; i < 4; i++ ) { CvPoint r1 = dst_corners[i%4]; CvPoint r2 = dst_corners[(i+1)%4]; cvLine(frame, cvPoint(r1.x, r1.y ), cvPoint(r2.x, r2.y ),CV_RGB(255,0,0),5 ); } } } cvShowImage( "u7karsh", frame); int key = cvWaitKey(1); if(key=='q') break; } cvDestroyWindow("u7karsh"); cvReleaseCapture(&capture); return 0; }
c++
image-processing
opencv
surf
null
null
open
find_obj.cpp is rotational variant opencv === Hey i tried using SURF to match 2 images so i used find_obj.cpp from opencv samples. but what i saw that if i rotate the image, it does not find it but if the image is rotated by 180 deg i.e.m upside down it is able to detect but even a small rotation on about 10deg makes it loose recognition.. please help.. to check just rotate ur box.png by 90deg and then run ur prog.. u will not be able to find it.. my sorce code : void flannFindPairs(const CvSeq*, const CvSeq* objectDescriptors, const CvSeq*, const CvSeq* imageDescriptors, vector<int>& ptpairs ){ int length = (int)(objectDescriptors->elem_size/sizeof(float)); cv::Mat m_object(objectDescriptors->total, length, CV_32F); cv::Mat m_image(imageDescriptors->total, length, CV_32F); // copy descriptors CvSeqReader obj_reader; float* obj_ptr = m_object.ptr<float>(0); cvStartReadSeq( objectDescriptors, &obj_reader ); for(int i = 0; i < objectDescriptors->total; i++ ) { const float* descriptor = (const float*)obj_reader.ptr; CV_NEXT_SEQ_ELEM( obj_reader.seq->elem_size, obj_reader ); memcpy(obj_ptr, descriptor, length*sizeof(float)); obj_ptr += length; } CvSeqReader img_reader; float* img_ptr = m_image.ptr<float>(0); cvStartReadSeq( imageDescriptors, &img_reader ); for(int i = 0; i < imageDescriptors->total; i++ ) { const float* descriptor = (const float*)img_reader.ptr; CV_NEXT_SEQ_ELEM( img_reader.seq->elem_size, img_reader ); memcpy(img_ptr, descriptor, length*sizeof(float)); img_ptr += length; } // find nearest neighbors using FLANN cv::Mat m_indices(objectDescriptors->total, 2, CV_32S); cv::Mat m_dists(objectDescriptors->total, 2, CV_32F); cv::flann::Index flann_index(m_image, cv::flann::KDTreeIndexParams(4)); // using 4 randomized kdtrees flann_index.knnSearch(m_object, m_indices, m_dists, 2, cv::flann::SearchParams(64) ); // maximum number of leafs checked int* indices_ptr = m_indices.ptr<int>(0); float* dists_ptr = m_dists.ptr<float>(0); for (int i=0;i<m_indices.rows;++i) { if (dists_ptr[2*i]<0.8*dists_ptr[2*i+1]) { ptpairs.push_back(i); ptpairs.push_back(indices_ptr[2*i]); } } } int locatePlanarObject( const CvSeq* objectKeypoints, const CvSeq* objectDescriptors, const CvSeq* imageKeypoints, const CvSeq* imageDescriptors, const CvPoint src_corners[4], CvPoint dst_corners[4] ) { vector<int> ptpairs; vector<CvPoint2D32f> pt1, pt2; CvMat _pt1, _pt2; int i, n; flannFindPairs( objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors, ptpairs ); n = (int)(ptpairs.size()/2); if( n < 4 ){ return 0; } pt1.resize(n); pt2.resize(n); for( i = 0; i < n; i++ ) { pt1[i] = ((CvSURFPoint*)cvGetSeqElem(objectKeypoints,ptpairs[i*2]))->pt; pt2[i] = ((CvSURFPoint*)cvGetSeqElem(imageKeypoints,ptpairs[i*2+1]))->pt; } _pt1 = cvMat(1, n, CV_32FC2, &pt1[0] ); _pt2 = cvMat(1, n, CV_32FC2, &pt2[0] ); if( !cvFindHomography( &_pt1, &_pt2, &_h, CV_RANSAC,3 )){ flag=0; return 0; } for( i = 0; i < 4; i++ ) { double x = src_corners[i].x, y = src_corners[i].y; double Z = 1./(h[6]*x + h[7]*y + h[8]); double X = (h[0]*x + h[1]*y + h[2])*Z; double Y = (h[3]*x + h[4]*y + h[5])*Z; dst_corners[i] = cvPoint(cvRound(X), cvRound(Y)); flag=1; } return 1; } int main( ) { cv::initModule_nonfree(); IplImage* object = cvLoadImage( "c:\\users\\u7karsh\\desktop\\marker.png", CV_LOAD_IMAGE_GRAYSCALE ); IplImage* image,*frame; CvCapture *capture; capture = cvCaptureFromCAM(0); CvMemStorage* storage = cvCreateMemStorage(0); cvNamedWindow("u7karsh", 1); while(true) { frame = cvQueryFrame(capture); image = cvCreateImage(cvGetSize(frame),8,1); cvCvtColor(frame,image,CV_BGR2GRAY); CvSeq* objectKeypoints = 0, *objectDescriptors = 0; CvSeq* imageKeypoints = 0, *imageDescriptors = 0; int i; CvSURFParams params = cvSURFParams(300,0); cvExtractSURF( object, 0, &objectKeypoints, &objectDescriptors, storage, params); cvExtractSURF( image, 0, &imageKeypoints, &imageDescriptors, storage, params); CvPoint src_corners[4] = {{0,0}, {object->width,0}, {object->width, object->height}, {0, object->height}}; CvPoint dst_corners[4]; IplImage* correspond = cvCreateImage( cvGetSize(image), 8, 3 ); cvCvtColor(image,correspond,CV_GRAY2RGB); if(locatePlanarObject( objectKeypoints, objectDescriptors, imageKeypoints, imageDescriptors, src_corners, dst_corners )){ if(0){//check(dst_corners,10,10)){ for( i = 0; i < 4; i++ ) { CvPoint r1 = dst_corners[i%4]; CvPoint r2 = dst_corners[(i+1)%4]; cvLine(frame, cvPoint(r1.x, r1.y ), cvPoint(r2.x, r2.y ),CV_RGB(255,0,0),5 ); } } } cvShowImage( "u7karsh", frame); int key = cvWaitKey(1); if(key=='q') break; } cvDestroyWindow("u7karsh"); cvReleaseCapture(&capture); return 0; }
0
10,980,939
06/11/2012 13:22:23
1,051,778
11/17/2011 12:29:45
690
43
"**** ERROR: missing required library to compile this module" when installing ruby-filemagic
I needed gem ruby-filemagic for some requirements in my project. I included it in my Gemfile and when i ran bundle install its giving me this error *** ERROR: missing required library to compile this module *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Please help me to resolve this issue.
ruby-on-rails
ruby
ruby-on-rails-3
bundle
null
null
open
"**** ERROR: missing required library to compile this module" when installing ruby-filemagic === I needed gem ruby-filemagic for some requirements in my project. I included it in my Gemfile and when i ran bundle install its giving me this error *** ERROR: missing required library to compile this module *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Please help me to resolve this issue.
0
11,410,249
07/10/2012 09:21:27
1,274,295
03/16/2012 14:51:24
30
3
JQuery and z-index
I have two DIVs: <div id="div1"></div> <div id="div2"></div> In special cases **div2** takes z-index:999. And in that case I can't to catch click on **div1**. Defined jquery funciton: $j = jQuery.noConflict(); $j(function() { $j(document).click( function(e) { var clicked = $j(e.target); }) }) So, scenarion is follows: - $j(document).click function called if click occurs on any div with the same z-index - $j(document).click function called if click occurs on div with the **greater** z-index and doesn't called on click on another Are there any ways to handle all clicks made on the whole screen?
jquery
z-index
null
null
null
null
open
JQuery and z-index === I have two DIVs: <div id="div1"></div> <div id="div2"></div> In special cases **div2** takes z-index:999. And in that case I can't to catch click on **div1**. Defined jquery funciton: $j = jQuery.noConflict(); $j(function() { $j(document).click( function(e) { var clicked = $j(e.target); }) }) So, scenarion is follows: - $j(document).click function called if click occurs on any div with the same z-index - $j(document).click function called if click occurs on div with the **greater** z-index and doesn't called on click on another Are there any ways to handle all clicks made on the whole screen?
0
11,410,255
07/10/2012 09:21:34
506,783
11/13/2010 15:03:43
698
14
Struts 1 and connection-pooling
I'm succeeded in using connection-pooling in my web app (which doesn't use structs framework). Now I need to integrate a part written by another developer (part that uses the struct 1 framework). The problem is that I don't succeed in using the pool with structs 1. Should it possible? In my Tomcat context.xml, I have: <Resource name="jdbc/MyDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="auser" password="apwd" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mydb" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" /> The other developer is using connections from servlet execute like: Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb", "auser", "apwd");
java
mysql
tomcat
connection-pooling
struts-1
null
open
Struts 1 and connection-pooling === I'm succeeded in using connection-pooling in my web app (which doesn't use structs framework). Now I need to integrate a part written by another developer (part that uses the struct 1 framework). The problem is that I don't succeed in using the pool with structs 1. Should it possible? In my Tomcat context.xml, I have: <Resource name="jdbc/MyDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="auser" password="apwd" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mydb" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" /> The other developer is using connections from servlet execute like: Class.forName("com.mysql.jdbc.Driver"); con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb", "auser", "apwd");
0
11,410,256
07/10/2012 09:21:36
1,182,809
02/01/2012 13:40:49
1
0
Write .properties file with coldfusion
Does anybody already made this? Because it is possible to use the JavaRB.cfc made by mr. Paul Hastings, but it gives the possibility to read from a properties file, no to write into it?
java
properties
coldfusion
null
null
null
open
Write .properties file with coldfusion === Does anybody already made this? Because it is possible to use the JavaRB.cfc made by mr. Paul Hastings, but it gives the possibility to read from a properties file, no to write into it?
0
11,410,257
07/10/2012 09:21:42
778,076
03/25/2011 16:01:20
863
7
layout of the screen moves up when keyboard is displayed
Let say I have the following layout: ![enter image description here][1] when I click on the edit text at the bottom I get this: ![enter image description here][2] As you can notice the image from the top goes upper and the whole layout moves. This is my xml for this layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFF" > <LinearLayout android:id="@+id/header" android:layout_width="fill_parent" android:layout_height="75dp" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:isScrollContainer="true" android:background="@drawable/header" > </LinearLayout> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/scrollauthentication" android:layout_below="@+id/header" android:background="#FFFFFF" android:fillViewport="true" > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FFFFFF" android:id="@+id/authenticationrelativelayout"> <TextView android:id="@+id/login" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/header" android:layout_marginLeft="30dp" android:layout_marginTop="20dp" android:text="login" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/lighter_orange" android:textSize="28dp" /> <TextView android:id="@+id/usernameTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/login" android:layout_below="@+id/login" android:layout_marginTop="16dp" android:text="username" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/dark_gray" /> <EditText android:id="@+id/user" android:layout_width="260dp" android:layout_height="42dp" android:layout_alignLeft="@+id/usernameTextView" android:layout_below="@+id/usernameTextView" android:background="@drawable/edittext_selector" android:imeOptions="actionDone" android:lines="1" android:paddingLeft="10dp" /> <TextView android:id="@+id/passwordTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/user" android:layout_below="@+id/user" android:text="password" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/dark_gray" /> <EditText android:id="@+id/password" android:layout_width="260dp" android:layout_height="42dp" android:layout_alignLeft="@+id/passwordTextView" android:layout_below="@+id/passwordTextView" android:background="@drawable/edittext_selector" android:imeOptions="actionDone" android:inputType="textPassword" android:lines="1" android:paddingLeft="10dp" > <requestFocus /> </EditText> <CheckBox android:id="@+id/remembercheckBox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/password" android:layout_below="@+id/password" android:layout_marginTop="37dp" android:button="@drawable/checkbox_selector" android:focusable="true" /> <TextView android:id="@+id/rememberText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/remembercheckBox" android:layout_alignBottom="@+id/remembercheckBox" android:layout_toRightOf="@+id/remembercheckBox" android:text="Remember me" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/dark_gray" /> </RelativeLayout> </ScrollView> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="30dp" android:layout_below="@+id/scrollauthentication" android:orientation="horizontal" > <Button android:id="@+id/loginButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/button_selected" android:text="log in" android:textColor="@drawable/textblack_selected" android:textStyle="bold" > </Button> <Button android:id="@+id/forgotten" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:background="@color/button_selected" android:text="forgotten password" android:textColor="@drawable/textblack_selected" android:textStyle="bold" /> </LinearLayout> </RelativeLayout> And I have also set this in manifest file for this activity: android:windowSoftInputMode="adjustPan" So is there a way to stop my layout from moving when the keyboard is displayed? Thank you!!!! [1]:http://i47.tinypic.com/2vchnih.png [2]:http://i45.tinypic.com/352lym9.png
android
layout
keyboard
null
null
null
open
layout of the screen moves up when keyboard is displayed === Let say I have the following layout: ![enter image description here][1] when I click on the edit text at the bottom I get this: ![enter image description here][2] As you can notice the image from the top goes upper and the whole layout moves. This is my xml for this layout: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFFFFF" > <LinearLayout android:id="@+id/header" android:layout_width="fill_parent" android:layout_height="75dp" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_alignParentTop="true" android:isScrollContainer="true" android:background="@drawable/header" > </LinearLayout> <ScrollView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/scrollauthentication" android:layout_below="@+id/header" android:background="#FFFFFF" android:fillViewport="true" > <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#FFFFFF" android:id="@+id/authenticationrelativelayout"> <TextView android:id="@+id/login" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/header" android:layout_marginLeft="30dp" android:layout_marginTop="20dp" android:text="login" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/lighter_orange" android:textSize="28dp" /> <TextView android:id="@+id/usernameTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/login" android:layout_below="@+id/login" android:layout_marginTop="16dp" android:text="username" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/dark_gray" /> <EditText android:id="@+id/user" android:layout_width="260dp" android:layout_height="42dp" android:layout_alignLeft="@+id/usernameTextView" android:layout_below="@+id/usernameTextView" android:background="@drawable/edittext_selector" android:imeOptions="actionDone" android:lines="1" android:paddingLeft="10dp" /> <TextView android:id="@+id/passwordTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/user" android:layout_below="@+id/user" android:text="password" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/dark_gray" /> <EditText android:id="@+id/password" android:layout_width="260dp" android:layout_height="42dp" android:layout_alignLeft="@+id/passwordTextView" android:layout_below="@+id/passwordTextView" android:background="@drawable/edittext_selector" android:imeOptions="actionDone" android:inputType="textPassword" android:lines="1" android:paddingLeft="10dp" > <requestFocus /> </EditText> <CheckBox android:id="@+id/remembercheckBox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/password" android:layout_below="@+id/password" android:layout_marginTop="37dp" android:button="@drawable/checkbox_selector" android:focusable="true" /> <TextView android:id="@+id/rememberText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/remembercheckBox" android:layout_alignBottom="@+id/remembercheckBox" android:layout_toRightOf="@+id/remembercheckBox" android:text="Remember me" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="@color/dark_gray" /> </RelativeLayout> </ScrollView> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="30dp" android:layout_below="@+id/scrollauthentication" android:orientation="horizontal" > <Button android:id="@+id/loginButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@color/button_selected" android:text="log in" android:textColor="@drawable/textblack_selected" android:textStyle="bold" > </Button> <Button android:id="@+id/forgotten" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:background="@color/button_selected" android:text="forgotten password" android:textColor="@drawable/textblack_selected" android:textStyle="bold" /> </LinearLayout> </RelativeLayout> And I have also set this in manifest file for this activity: android:windowSoftInputMode="adjustPan" So is there a way to stop my layout from moving when the keyboard is displayed? Thank you!!!! [1]:http://i47.tinypic.com/2vchnih.png [2]:http://i45.tinypic.com/352lym9.png
0
11,410,233
07/10/2012 09:20:01
966,437
09/27/2011 07:02:01
2,006
84
How to send an POST HTTP method through a link href?
I have the following link and want to issue a `POST` method instead of default `GET` method. <li><a href="/logout">logout</a></li> I know `connect` has a `methodOverride` middleware to handle form submission methods but it doesn't help with normal link href. How could I archive that?
http
express
nodes
middleware
null
null
open
How to send an POST HTTP method through a link href? === I have the following link and want to issue a `POST` method instead of default `GET` method. <li><a href="/logout">logout</a></li> I know `connect` has a `methodOverride` middleware to handle form submission methods but it doesn't help with normal link href. How could I archive that?
0
11,410,236
07/10/2012 09:20:20
92,153
04/17/2009 14:44:59
2,525
21
Is there any DatePicker for twitter-bootstrap 1.4?
I wasn't able to find any date picker in the documentation. How could such an obvious control be missing? Is there any third party solution to this? Thanks,
twitter-bootstrap
null
null
null
null
null
open
Is there any DatePicker for twitter-bootstrap 1.4? === I wasn't able to find any date picker in the documentation. How could such an obvious control be missing? Is there any third party solution to this? Thanks,
0
11,410,263
07/10/2012 09:22:18
1,165,123
01/23/2012 14:24:03
88
5
python import at same folder
If import an file in another file in the same folder. file structure: . ├── b │   ├── c.py │   ├── d.py │   └── __init__.py └── __init__.py in d.py: import b.c print "import successfully" I just use: python d.py the program cannot run and raise a ImportError. To solve the problem, I use sys.path.insert(0, realpath(path_join(dirname(__file__), '../'))) However, It doesn't seems like the standard way. Like some famous project: tornado or some what, always using this structure. autotest tools such as sniffer, autonose can run such structure if the import sentence is in a unittest file. I don't know why. PEP328 or PEP366 don't give me a great solution about this. PEP8 recommend me to do things like this way. The question also occur when import another module (in another file) such as: ├── a │   ├── e.py │   └── __init__.py ├── b │   ├── c.py │   ├── d.py │   └── __init__.py ├── __init__.py
python
import
pep8
null
null
null
open
python import at same folder === If import an file in another file in the same folder. file structure: . ├── b │   ├── c.py │   ├── d.py │   └── __init__.py └── __init__.py in d.py: import b.c print "import successfully" I just use: python d.py the program cannot run and raise a ImportError. To solve the problem, I use sys.path.insert(0, realpath(path_join(dirname(__file__), '../'))) However, It doesn't seems like the standard way. Like some famous project: tornado or some what, always using this structure. autotest tools such as sniffer, autonose can run such structure if the import sentence is in a unittest file. I don't know why. PEP328 or PEP366 don't give me a great solution about this. PEP8 recommend me to do things like this way. The question also occur when import another module (in another file) such as: ├── a │   ├── e.py │   └── __init__.py ├── b │   ├── c.py │   ├── d.py │   └── __init__.py ├── __init__.py
0
11,410,265
07/10/2012 09:22:36
1,140,492
01/10/2012 09:16:25
1
1
External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.20: cannot open shared object file
I'm able to do a snmpget/snmpwalk and check_snmp through command line. But, when I do it through Nagios (creating a host & services entry in the config files), I see this error in the "Status Information" of the services under specific host: External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.20: cannot open shared object file: No such file or directory OS: SLES 11
snmp
nagios
net-snmp
null
null
null
open
External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.20: cannot open shared object file === I'm able to do a snmpget/snmpwalk and check_snmp through command line. But, when I do it through Nagios (creating a host & services entry in the config files), I see this error in the "Status Information" of the services under specific host: External command error: /usr/local/bin/snmpget: error while loading shared libraries: libnetsnmp.so.20: cannot open shared object file: No such file or directory OS: SLES 11
0
11,713,211
07/29/2012 21:44:03
1,428,817
05/31/2012 15:30:03
23
0
HTML & JS: read local database
I want to make some sort of website on a USB stick which opens in a browser. The HTML file should be able to read a (sql-)database in the same folder using javascript. It's a little application for me. These are my files: USB stick: -- start.html -- database.sql HTML5 offers "local storage" and it works perfectly. But with this method I can't access a local, already existing database on the stick. The browser creates a separate, emtpy database and saves it not on the stick. I don't need to write datasets. Is there a different method to read databases? Thanks!
javascript
html
sql
html5
null
null
open
HTML & JS: read local database === I want to make some sort of website on a USB stick which opens in a browser. The HTML file should be able to read a (sql-)database in the same folder using javascript. It's a little application for me. These are my files: USB stick: -- start.html -- database.sql HTML5 offers "local storage" and it works perfectly. But with this method I can't access a local, already existing database on the stick. The browser creates a separate, emtpy database and saves it not on the stick. I don't need to write datasets. Is there a different method to read databases? Thanks!
0
11,713,212
07/29/2012 21:44:25
1,058,393
11/21/2011 18:42:05
353
4
Regex - finding tabs or 4 spaces (in C# code)
I'm working on formatting C# code in HTML. I'm trying to replace tabs/indents with 4 spaces. Here's an example. protected void Page_Load(object sender, EventArgs e) { Response.Write("Hello World"); } I need to replace the tab before Response.Write with 4 spaces. I tried things like ^\t, with different variations, tried ^\s\s\s\s. I thought this would be simple, but nothing I've tried seemed match the tabs. What am I doing wrong? Thank you!
c#
regex
null
null
null
null
open
Regex - finding tabs or 4 spaces (in C# code) === I'm working on formatting C# code in HTML. I'm trying to replace tabs/indents with 4 spaces. Here's an example. protected void Page_Load(object sender, EventArgs e) { Response.Write("Hello World"); } I need to replace the tab before Response.Write with 4 spaces. I tried things like ^\t, with different variations, tried ^\s\s\s\s. I thought this would be simple, but nothing I've tried seemed match the tabs. What am I doing wrong? Thank you!
0
11,713,454
07/29/2012 22:15:38
171,036
09/09/2009 18:46:51
117
2
How to smoothly scale canvas text in chrome?
Running the script below in **IE9** produces a buttery **smooth** animation. But the same script when run in **Chrome20** (win & mac) produces a **shaky** animation. How can i fix this? Also I would appreciate if someone could provide a definite answer to the following related questions as well. Does chrome support sub-pixel text rendering? Does chrome support GPU based text rendering? If so then please mention the exact version and OS the feature was added in. <canvas id="myCanvas" width="1000" height="500" style="border:1px solid #d3d3d3;"> </canvas> <script type="text/javascript"> var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); var i=12; function f() { ctx.clearRect(0,0,1000,500); ctx.font=i + "px Arial"; ctx.fillText("Hello World",10,350); i+=0.1; } setInterval("f()", 16); </script>
javascript
google-chrome
internet-explorer-9
html5-canvas
null
null
open
How to smoothly scale canvas text in chrome? === Running the script below in **IE9** produces a buttery **smooth** animation. But the same script when run in **Chrome20** (win & mac) produces a **shaky** animation. How can i fix this? Also I would appreciate if someone could provide a definite answer to the following related questions as well. Does chrome support sub-pixel text rendering? Does chrome support GPU based text rendering? If so then please mention the exact version and OS the feature was added in. <canvas id="myCanvas" width="1000" height="500" style="border:1px solid #d3d3d3;"> </canvas> <script type="text/javascript"> var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); var i=12; function f() { ctx.clearRect(0,0,1000,500); ctx.font=i + "px Arial"; ctx.fillText("Hello World",10,350); i+=0.1; } setInterval("f()", 16); </script>
0
11,713,455
07/29/2012 22:15:52
1,561,587
07/29/2012 21:53:11
1
0
stop jqueryrotate plugin on mouseover on current position and continue on mouseout
i am trying to stop a spinning wheel on the current position its in on mouse over using jqueryrotate plug in and continue animation rotating where it was stopped on mouse out, i can't seem to make it work with the stop method which works on my custom animations the code for the spinning wheel would be here on jsfiddle http://jsfiddle.net/73pXD/ var angle = 0; setInterval(function(){ angle+=3; $("#carwheel").rotate(angle,{ easing:'easeInOutElastic'}); $("#carwheel") .mouseover(function () { $(this).stop(); }) .mouseout(function () { $(this).resume(); }) },100); let me know if anybody can help Thank You
jquery
animation
rotation
mouseover
mouseout
null
open
stop jqueryrotate plugin on mouseover on current position and continue on mouseout === i am trying to stop a spinning wheel on the current position its in on mouse over using jqueryrotate plug in and continue animation rotating where it was stopped on mouse out, i can't seem to make it work with the stop method which works on my custom animations the code for the spinning wheel would be here on jsfiddle http://jsfiddle.net/73pXD/ var angle = 0; setInterval(function(){ angle+=3; $("#carwheel").rotate(angle,{ easing:'easeInOutElastic'}); $("#carwheel") .mouseover(function () { $(this).stop(); }) .mouseout(function () { $(this).resume(); }) },100); let me know if anybody can help Thank You
0
11,713,457
07/29/2012 22:16:03
1,225,686
02/22/2012 11:33:19
1
1
Unity for asp.net webapplication with class library
I am using Unity in my webapplication project. I also have other library project ex. Presentation, Data. My Unity configuration is in web.config file. My problem is I can not use dependency injection from one libary to another. I want to inject property DataService from library Data in library Presentation in class PlayViewPresenter. This is section fomr configuration file: <unity xmlns="http://schemas.microsoft.com/practices/2010/unity"> <alias alias="IDataService" type="Data.IDataService, Data"/> <alias alias="DataService" type="Data.DataService, Data"/> <alias alias="PlayViewPresenter" type="Presentation.PlayViewPresenter, Presentation"/> <assembly name="Data"/> <assembly name="Presentation"/> <namespace name="Data"/> <namespace name="Presentation"/> <container name="application"> </container> <container name="session"> <register type="IDataService" mapTo="DataService"> <lifetime type="TransientLifetimeManager"/> </register> </container> </unity>
asp.net
web-applications
unity
null
null
null
open
Unity for asp.net webapplication with class library === I am using Unity in my webapplication project. I also have other library project ex. Presentation, Data. My Unity configuration is in web.config file. My problem is I can not use dependency injection from one libary to another. I want to inject property DataService from library Data in library Presentation in class PlayViewPresenter. This is section fomr configuration file: <unity xmlns="http://schemas.microsoft.com/practices/2010/unity"> <alias alias="IDataService" type="Data.IDataService, Data"/> <alias alias="DataService" type="Data.DataService, Data"/> <alias alias="PlayViewPresenter" type="Presentation.PlayViewPresenter, Presentation"/> <assembly name="Data"/> <assembly name="Presentation"/> <namespace name="Data"/> <namespace name="Presentation"/> <container name="application"> </container> <container name="session"> <register type="IDataService" mapTo="DataService"> <lifetime type="TransientLifetimeManager"/> </register> </container> </unity>
0
11,713,464
07/29/2012 22:17:04
651,174
03/09/2011 08:26:41
2,487
60
Compaacting/minifying dynamic html
I am using django templating, and for readability I have html that looks similar to the following: {% if some_variable %} text {% else %} nothing exists here {% endif %} {% for item in set %} {% if forloop.first %} ...etc... It converts to the following html at runtime, which includes tons of whitespace and returns: text <div> <li class='some_class > some text </li> </div> etc... Some pages even run to ~3,000 lines of html when viewing the page source. Is there a tool to compress this html at runtime? What about a tool to remove extra line breaks?
html
django
compression
gzip
null
null
open
Compaacting/minifying dynamic html === I am using django templating, and for readability I have html that looks similar to the following: {% if some_variable %} text {% else %} nothing exists here {% endif %} {% for item in set %} {% if forloop.first %} ...etc... It converts to the following html at runtime, which includes tons of whitespace and returns: text <div> <li class='some_class > some text </li> </div> etc... Some pages even run to ~3,000 lines of html when viewing the page source. Is there a tool to compress this html at runtime? What about a tool to remove extra line breaks?
0
11,297,840
07/02/2012 16:45:55
1,496,641
07/02/2012 16:37:25
1
0
Get the url of the lnk
I have to write xslt to wordml (2007) documents. There are hyperlinks like below. < w:p w:rsidR="00FD086A" w:rsidRDefault="00425A76" w:rsidP="00FD086A"> < w: hyperlink r:id="rId4" w:history="1"> < w:r w:rsidR="00FD086A" w:rsidRPr="00425A76"> < w:rPr> < w:rStyle w:val="Hyperlink"/> < /w:rPr> < w:t>google</w:t> < /w:r> < /w:hyperlink> < /w:p> I want to get the url for the link name. In here I want to get the url for the "google" link. I know its there in Relationships, but I can't access that with xslt. Does anybody know? (Probably writing a template?) please help me!
xslt
xpath
xslt-1.0
xslt-2.0
null
null
open
Get the url of the lnk === I have to write xslt to wordml (2007) documents. There are hyperlinks like below. < w:p w:rsidR="00FD086A" w:rsidRDefault="00425A76" w:rsidP="00FD086A"> < w: hyperlink r:id="rId4" w:history="1"> < w:r w:rsidR="00FD086A" w:rsidRPr="00425A76"> < w:rPr> < w:rStyle w:val="Hyperlink"/> < /w:rPr> < w:t>google</w:t> < /w:r> < /w:hyperlink> < /w:p> I want to get the url for the link name. In here I want to get the url for the "google" link. I know its there in Relationships, but I can't access that with xslt. Does anybody know? (Probably writing a template?) please help me!
0
11,298,097
07/02/2012 17:06:58
1,496,672
07/02/2012 16:55:38
1
0
concatenating TimeSeries of different lengths using Pandas
I am using pandas in python. I have several Series indexed by dates that I would like to concat into a single DataFrame, but the Series are of different lengths because of missing dates etc. I would like the dates that do match up to match up, but where there is missing data for it to be interpolated or just use the previous date or something like that. What is the easiest way to do this?
python
data.frame
concat
pandas
null
null
open
concatenating TimeSeries of different lengths using Pandas === I am using pandas in python. I have several Series indexed by dates that I would like to concat into a single DataFrame, but the Series are of different lengths because of missing dates etc. I would like the dates that do match up to match up, but where there is missing data for it to be interpolated or just use the previous date or something like that. What is the easiest way to do this?
0
11,298,120
07/02/2012 17:08:53
1,247,600
03/04/2012 02:08:44
1
0
CSS drop down menu not working in iframe for ie8 and lower
Developing a Facebook tab for a fan page using a static iframe app by WooBox. Can't use JS because of Facebook's security settings. My CSS dropdown menu's aren't working within the iframe for ie8 and lower. The image's showup fine, but the ul hover:li ul; display: inline; doesn't seem to be working. Works fine outside of iframe on all browsers. Here's my code: <style> #menu-nav { width: 213px; padding: 0px; margin:0px; } #menu-nav ul { list-style:none; margin: 0px; padding: 0px; clear:both; } #menu-nav ul li { position:relative; float:left; margin: 0px; padding:0px; } #menu-nav ul li a { display:block; } #menu-nav ul li ul { display: none; clear:both; max-width: 280px; } #menu-nav ul li:hover ul { display:inline; position:absolute; min-width:280px; margin-top: 0px; left: 15px; padding: 0px; } #menu-nav ul li:hover ul li p{ border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; background:#fadea9; font-family:Arial, Helvetica, sans-serif; font-size:12px; width:170px; text-align:left; padding:5px 10px; margin: -15px 0px 0px 0px; position: relative; } #menu-nav ul li:hover ul li a { display:inline; } </style> <body> <div style="background:url( http://www.careerstaff.com/Images/external/Social_Media/images/support.jpg) no-repeat; margin-left:auto; margin-right:auto; width:790px; height:691px; position:relative; top:0px; left: 0px;"> <div style="position:relative; left:210px; top:317px;" id="menu-nav"> <ul> <li style="z-index:99; position:relative; left:0px;"><a><img src="http://www.careerstaff.com/Images/external/Social_Media/images/Links.png" style="z-index:98; position:relative; left:0px;" /></a> <ul> <li style="z-index:97; position:relative; left:0px;"><p><a href="http://www.careerstaff.com/content/default/resources.aspx" target="_blank" style="color:#3b5b9f;">Links</a> to associations and resources for your profession.</p> </li> </ul> </li> <li style="z-index:96; position:relative; left:0px; padding-top: 23px;"><a><img src="http://www.careerstaff.com/Images/external/Social_Media/images/CEUs.png" style="z- index:95; position:relative; left:0px;" /></a> <ul> <li style="z-index:94; position:relative; left:0px;"><p>CareerStaff employees can use Sun University’s outstanding <a href="http://www.readynurse.com/content/default/unlimited_CEUs.aspx" target="_blank" style="color:#3b5b9f;">Continuing Education Program</a> to meet their learning goals. Until then, we have found a web site that offers you access to <a href="http://usatravmed.com/main/page_free_cme_therapists_ptotst.php" target="_blank" style="color:#3b5b9f;">free CEUs</a>.</p> </li> </ul> </li> <li style="padding-top: 23px; z-index:93; position:relative; left:0px;"><a><img src="http://www.careerstaff.com/Images/external/Social_Media/images/Apply2.png" style="z-index:92; position:relative; left:0px;" /></a> <ul> <li style="z-index:91; position:relative; left:0px;"><p><strong>Like what you see?</strong> Whether you need a permanent placement, local contract or per diem position, we can help you find your ideal assignment. <a href="http://www.careerstaff.com/Jobs/Jobs.aspx" target="_blank" style="color:#3b5b9f;">Apply now</a>.</p> </li> </ul> </li> </ul> </div> </div>
internet-explorer-8
facebook-iframe
css-dropdown
null
null
null
open
CSS drop down menu not working in iframe for ie8 and lower === Developing a Facebook tab for a fan page using a static iframe app by WooBox. Can't use JS because of Facebook's security settings. My CSS dropdown menu's aren't working within the iframe for ie8 and lower. The image's showup fine, but the ul hover:li ul; display: inline; doesn't seem to be working. Works fine outside of iframe on all browsers. Here's my code: <style> #menu-nav { width: 213px; padding: 0px; margin:0px; } #menu-nav ul { list-style:none; margin: 0px; padding: 0px; clear:both; } #menu-nav ul li { position:relative; float:left; margin: 0px; padding:0px; } #menu-nav ul li a { display:block; } #menu-nav ul li ul { display: none; clear:both; max-width: 280px; } #menu-nav ul li:hover ul { display:inline; position:absolute; min-width:280px; margin-top: 0px; left: 15px; padding: 0px; } #menu-nav ul li:hover ul li p{ border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; background:#fadea9; font-family:Arial, Helvetica, sans-serif; font-size:12px; width:170px; text-align:left; padding:5px 10px; margin: -15px 0px 0px 0px; position: relative; } #menu-nav ul li:hover ul li a { display:inline; } </style> <body> <div style="background:url( http://www.careerstaff.com/Images/external/Social_Media/images/support.jpg) no-repeat; margin-left:auto; margin-right:auto; width:790px; height:691px; position:relative; top:0px; left: 0px;"> <div style="position:relative; left:210px; top:317px;" id="menu-nav"> <ul> <li style="z-index:99; position:relative; left:0px;"><a><img src="http://www.careerstaff.com/Images/external/Social_Media/images/Links.png" style="z-index:98; position:relative; left:0px;" /></a> <ul> <li style="z-index:97; position:relative; left:0px;"><p><a href="http://www.careerstaff.com/content/default/resources.aspx" target="_blank" style="color:#3b5b9f;">Links</a> to associations and resources for your profession.</p> </li> </ul> </li> <li style="z-index:96; position:relative; left:0px; padding-top: 23px;"><a><img src="http://www.careerstaff.com/Images/external/Social_Media/images/CEUs.png" style="z- index:95; position:relative; left:0px;" /></a> <ul> <li style="z-index:94; position:relative; left:0px;"><p>CareerStaff employees can use Sun University’s outstanding <a href="http://www.readynurse.com/content/default/unlimited_CEUs.aspx" target="_blank" style="color:#3b5b9f;">Continuing Education Program</a> to meet their learning goals. Until then, we have found a web site that offers you access to <a href="http://usatravmed.com/main/page_free_cme_therapists_ptotst.php" target="_blank" style="color:#3b5b9f;">free CEUs</a>.</p> </li> </ul> </li> <li style="padding-top: 23px; z-index:93; position:relative; left:0px;"><a><img src="http://www.careerstaff.com/Images/external/Social_Media/images/Apply2.png" style="z-index:92; position:relative; left:0px;" /></a> <ul> <li style="z-index:91; position:relative; left:0px;"><p><strong>Like what you see?</strong> Whether you need a permanent placement, local contract or per diem position, we can help you find your ideal assignment. <a href="http://www.careerstaff.com/Jobs/Jobs.aspx" target="_blank" style="color:#3b5b9f;">Apply now</a>.</p> </li> </ul> </li> </ul> </div> </div>
0
11,298,115
07/02/2012 17:08:37
729,914
04/28/2011 18:41:15
3
0
Heroku commands with inline user / password
I'm searching for a 1 line command to log into my heroku account and execute an action. Example: heroku apps - Will ask me for my user name and password everytime I'm looking for something like heroku -email [email protected] -password secret apps So that I can execute everything inline. Does support for this exist?
heroku
null
null
null
null
null
open
Heroku commands with inline user / password === I'm searching for a 1 line command to log into my heroku account and execute an action. Example: heroku apps - Will ask me for my user name and password everytime I'm looking for something like heroku -email [email protected] -password secret apps So that I can execute everything inline. Does support for this exist?
0
11,298,118
07/02/2012 17:08:48
331,225
05/03/2010 08:13:03
697
24
IIS virtual directory pointing to wordpress blog hosted on another computer
I have a windows box (which hosts www.example.com) and a linux box (which hosts wordpress blog). Is there a way I can create a virtual directory on the windows box - so that when a user accesses www.example.com/blog, it gets the content from the linux server? ( I want the url in the browser to remain www.example.com/blog ) Thanks
iis
iis7
iis6
virtual-directory
null
null
open
IIS virtual directory pointing to wordpress blog hosted on another computer === I have a windows box (which hosts www.example.com) and a linux box (which hosts wordpress blog). Is there a way I can create a virtual directory on the windows box - so that when a user accesses www.example.com/blog, it gets the content from the linux server? ( I want the url in the browser to remain www.example.com/blog ) Thanks
0
11,298,121
07/02/2012 17:09:02
777,297
05/31/2011 08:11:07
153
2
using Jquery livequery on dropdown when arrow key pressed?
I have the code with jquery like this and it works but there is a problem with arrow key press. <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $(function(){ $("#tasks").hide(); $("select#categories").change(function(){ $("#tasks").show(); $.getJSON("ajax.php?module=responsibles&action=list_tasks",{id: $(this).val()}, function(j){ if($("#categories").val()=="-0") { $("#tasks").hide(); } //if the div is hidden $("div#form_objectifs").hide(); var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } $("#tasks").html(options); $('#tasks option:first').attr('selected', 'selected'); }) }) }); </script> I have try to with this : http://jsfiddle.net/tW6Su/2/ that give possibility to arrow key press filter. So I tried: <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $(function(){ $("#tasks").hide(); $("select#categories").livequery("change", function () { $("#tasks").show(); $.getJSON("ajax.php?module=responsibles&action=list_tasks",{id: $(this).val()}, function(j){ if($("#categories").val()=="-0") { $("#tasks").hide(); } //if the div is hidden $("div#form_objectifs").hide(); var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } $("#tasks").html(options); $('#tasks option:first').attr('selected', 'selected'); }) }).livequery("keypress", function() { $(this).trigger("change"); }); </script> But I got a js error. $("select#categories").livequery is not a function http://localhost/project/index.php?module=responsibles&action=objectivs Line 120 Anyone Could help me what am wrong ? thanks
javascript
jquery
null
null
null
null
open
using Jquery livequery on dropdown when arrow key pressed? === I have the code with jquery like this and it works but there is a problem with arrow key press. <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $(function(){ $("#tasks").hide(); $("select#categories").change(function(){ $("#tasks").show(); $.getJSON("ajax.php?module=responsibles&action=list_tasks",{id: $(this).val()}, function(j){ if($("#categories").val()=="-0") { $("#tasks").hide(); } //if the div is hidden $("div#form_objectifs").hide(); var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } $("#tasks").html(options); $('#tasks option:first').attr('selected', 'selected'); }) }) }); </script> I have try to with this : http://jsfiddle.net/tW6Su/2/ that give possibility to arrow key press filter. So I tried: <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $(function(){ $("#tasks").hide(); $("select#categories").livequery("change", function () { $("#tasks").show(); $.getJSON("ajax.php?module=responsibles&action=list_tasks",{id: $(this).val()}, function(j){ if($("#categories").val()=="-0") { $("#tasks").hide(); } //if the div is hidden $("div#form_objectifs").hide(); var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[i].optionValue + '">' + j[i].optionDisplay + '</option>'; } $("#tasks").html(options); $('#tasks option:first').attr('selected', 'selected'); }) }).livequery("keypress", function() { $(this).trigger("change"); }); </script> But I got a js error. $("select#categories").livequery is not a function http://localhost/project/index.php?module=responsibles&action=objectivs Line 120 Anyone Could help me what am wrong ? thanks
0
11,298,108
07/02/2012 17:07:52
394,484
07/17/2010 05:02:38
1,772
85
UIPopOver management and USE_BLOCK_IN_FRAME error
I've recently upgraded to iOS 6 Beta and am having some issues. (I know it's a beta, but I'm not yet convinced that it's actually iOS 6-related.) The issue has the following parameters: 1. Custom `UITableViewCell` with `UIButton` objects that generate `UIPopOver` objects, presented from the frame of the `UIButton` that was tapped. 2. The `UIPopOver` is displayed and then the iPad is rotated. 3. My view dismisses the `UIPopOver` when the rotation animation completes and then re-displays the `UIPopOver`. Relevant Information: 1. The first rotation proceeds fine; the `UIPopOver` is dismissed and re-displayed correctly. 2. The second rotation (EVERY TIME) is what breaks the app. 3. I have a symbolic breakpoint set, but I'm not getting any useful information. 4. I'm doing the same thing with `UIPopOver` objects presented from `UIBarButton` objects in a `UIToolbar`. I experience no problems with those transitions. 5. This is a new problem that is related to code that hasn't changed in a good while. 6. The error I receive is: "warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame." Here's the code that executes related to the rotation: - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { if ([self PopOver]) { [[self PopOver] dismissPopoverAnimated:YES]; [self setPopOver:nil]; [self ButtonPressed:[self TouchedCell]]; } [[self TableView1] reloadData]; [[self TableView2] reloadData]; } - (void)ButtonPressed:(Cell *)cell { [self setTouchedCell:cell]; NSString *nibName = @"View"; if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) { nibName = @"View-iPad"; } ViewController *vc = [[ViewController alloc] initWithNibName:nibName bundle:nil]; if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) { UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:vc]; [self setPopOver:popOver]; [popOver setDelegate:self]; [[self PopOver] setPopoverContentSize:CGSizeMake(320, 320)]; [popOver presentPopoverFromRect:[[cell CheckButton] frame] inView:[cell contentView] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } else { // iPhone doesn't use PopOvers... } } Anyone know what I should do next?
objective-c
ios
uipopover
null
null
null
open
UIPopOver management and USE_BLOCK_IN_FRAME error === I've recently upgraded to iOS 6 Beta and am having some issues. (I know it's a beta, but I'm not yet convinced that it's actually iOS 6-related.) The issue has the following parameters: 1. Custom `UITableViewCell` with `UIButton` objects that generate `UIPopOver` objects, presented from the frame of the `UIButton` that was tapped. 2. The `UIPopOver` is displayed and then the iPad is rotated. 3. My view dismisses the `UIPopOver` when the rotation animation completes and then re-displays the `UIPopOver`. Relevant Information: 1. The first rotation proceeds fine; the `UIPopOver` is dismissed and re-displayed correctly. 2. The second rotation (EVERY TIME) is what breaks the app. 3. I have a symbolic breakpoint set, but I'm not getting any useful information. 4. I'm doing the same thing with `UIPopOver` objects presented from `UIBarButton` objects in a `UIToolbar`. I experience no problems with those transitions. 5. This is a new problem that is related to code that hasn't changed in a good while. 6. The error I receive is: "warning: Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame." Here's the code that executes related to the rotation: - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { if ([self PopOver]) { [[self PopOver] dismissPopoverAnimated:YES]; [self setPopOver:nil]; [self ButtonPressed:[self TouchedCell]]; } [[self TableView1] reloadData]; [[self TableView2] reloadData]; } - (void)ButtonPressed:(Cell *)cell { [self setTouchedCell:cell]; NSString *nibName = @"View"; if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) { nibName = @"View-iPad"; } ViewController *vc = [[ViewController alloc] initWithNibName:nibName bundle:nil]; if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad) { UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:vc]; [self setPopOver:popOver]; [popOver setDelegate:self]; [[self PopOver] setPopoverContentSize:CGSizeMake(320, 320)]; [popOver presentPopoverFromRect:[[cell CheckButton] frame] inView:[cell contentView] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } else { // iPhone doesn't use PopOvers... } } Anyone know what I should do next?
0
11,298,123
07/02/2012 17:09:17
1,401,515
05/17/2012 16:49:42
133
1
No Conceptual Schema node to embed as a resource
Okay, so I've been testing my site for a few weeks now, and everything's been fine. I've had it live on the server, and it had previously worked both on and off-line. However, yesterday it just decided to not work online (still works great offline though). When I visit my site, I'm greeted with this message: > Server Error in '/' Application. > -------------------------------------------------------------------------------- > > > Parser Error Description: An error occurred during the parsing of a > resource required to service this request. Please review the following > specific parse error details and modify your source file > appropriately. > > Parser Error Message: No Conceptual Schema node to embed as a > resource > > Source Error: > > > > [No relevant source lines] > > > Source File: /App_Code/MyWebsite.edmx Line: 0 > > > -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; > ASP.NET Version:4.0.30319.272 I have Google'd this for a while and haven't found any solutions. I've even tried creating a whole new project and just importing existing code files and then regenerating the EF db stuff (which has helped with similar random problems in VS 2012 in the past) - but that didn't work. Has anyone experienced this issue before? Any help is much appreciated. Thank you
c#
.net
entity-framework
razor
null
null
open
No Conceptual Schema node to embed as a resource === Okay, so I've been testing my site for a few weeks now, and everything's been fine. I've had it live on the server, and it had previously worked both on and off-line. However, yesterday it just decided to not work online (still works great offline though). When I visit my site, I'm greeted with this message: > Server Error in '/' Application. > -------------------------------------------------------------------------------- > > > Parser Error Description: An error occurred during the parsing of a > resource required to service this request. Please review the following > specific parse error details and modify your source file > appropriately. > > Parser Error Message: No Conceptual Schema node to embed as a > resource > > Source Error: > > > > [No relevant source lines] > > > Source File: /App_Code/MyWebsite.edmx Line: 0 > > > -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:4.0.30319; > ASP.NET Version:4.0.30319.272 I have Google'd this for a while and haven't found any solutions. I've even tried creating a whole new project and just importing existing code files and then regenerating the EF db stuff (which has helped with similar random problems in VS 2012 in the past) - but that didn't work. Has anyone experienced this issue before? Any help is much appreciated. Thank you
0
11,567,565
07/19/2012 19:02:22
881,286
08/05/2011 20:27:14
909
33
WebStorm How run nodejs as root to execute shell commands?
How Can I run a node.js application through WebStorm IDE with root privileges in order to let node.js run shell commands? Thanks in advance!
node.js
sudo
webstorm
null
null
null
open
WebStorm How run nodejs as root to execute shell commands? === How Can I run a node.js application through WebStorm IDE with root privileges in order to let node.js run shell commands? Thanks in advance!
0
11,567,570
07/19/2012 19:02:33
374,620
06/23/2010 20:21:40
390
20
Default Silverlight splash screen missing (but only in CRM 2011)?
Something weird is happening. My Silverlight applications for CRM 2011 are missing their default loading splash-screens. I can create a simple Silverlight app without setting the `RooVisual` element... //this.RootVisual = new MainPage(); which will create an "endlessly loading" effect. Normally, if I run it via the debugger or host it in an IIS, it's as you'd expect: I get the typical SL loading indicator. However, if I place it in CRM 2011 web resource (doesn't seem to matter if it's a local CRM installation or online) and use that as part of a form, I just get a white rectangle. Now, so far, all my SL controls are used in local installations, so loading times are non-existent. However, I'm creating a solution which might end up being used on-line, and leaving it as it is, a client could think the application has hung-up or crashed while in fact it is still downloading. I've also tried using a custom splash-screen, with the same results. What could possibly be wrong? Is this some documented (or undocumented :P) CRM feature that I missed?
dynamics-crm-2011
silverlight-5.0
null
null
null
null
open
Default Silverlight splash screen missing (but only in CRM 2011)? === Something weird is happening. My Silverlight applications for CRM 2011 are missing their default loading splash-screens. I can create a simple Silverlight app without setting the `RooVisual` element... //this.RootVisual = new MainPage(); which will create an "endlessly loading" effect. Normally, if I run it via the debugger or host it in an IIS, it's as you'd expect: I get the typical SL loading indicator. However, if I place it in CRM 2011 web resource (doesn't seem to matter if it's a local CRM installation or online) and use that as part of a form, I just get a white rectangle. Now, so far, all my SL controls are used in local installations, so loading times are non-existent. However, I'm creating a solution which might end up being used on-line, and leaving it as it is, a client could think the application has hung-up or crashed while in fact it is still downloading. I've also tried using a custom splash-screen, with the same results. What could possibly be wrong? Is this some documented (or undocumented :P) CRM feature that I missed?
0
11,567,572
07/19/2012 19:02:37
1,506,928
07/06/2012 13:46:03
10
0
Undeclared variable and expected identifier errors
I'm trying to create a program that will be able create and send tcp packages, but keep getting these errors when compiling. error: expected identifier or ‘(’ before ‘,’ token and error: ‘sin’ undeclared (first use in this function) error: ‘din’ undeclared (first use in this function) Now I'm sure these are the result of something really obvious, but I've stared myself blind on this piece of code and can't get my head around it. The function is as follows: int send_tcp() { int sock, one = 1; char buffer[PCKT_LEN]; struct sockaddr_in, sin, din; const int *val = &one; sock = socket(PF_INET, SOCK_RAW, IPPROTO_TCP); if (sock < 0) { printf("\nError: socket()\n\n"); exit (-1); } else printf ("\nsocket() - Using SOCK_RAW and TCP protocol is OK.\n\n"); /* Size of the headers */ struct ipheader *ip = (struct ipheader *) buffer; struct tcpheader *tcp = (struct tcpheader *) (buffer + sizeof (struct ipheader)); memset (buffer, 0, PCKT_LEN); /* IP attributes */ ip->iph_ihl = 5; ip->iph_ver = 4; ip->iph_tos = 16; ip->iph_len = sizeof(struct ipheader) + sizeof(struct tcpheader); ip->iph_id = htons(54321); ip->iph_offset = 0; ip->iph_ttl = 64; ip->iph_protocol = 6; ip->iph_chksum = 0; ip->iph_sourceip = sip; ip->iph_destip = dip; /* TCP attributes */ tcp->tcph_sourceport = sport; tcp->tcph_destport = dport; tcp->tcph_seqnum = htonl(1); tcp->tcph_acknum = 0; tcp->tcph_offset = 5; tcp->tcph_syn = 1; tcp->tcph_ack = 0; tcp->tcph_win = htons(32767); tcp->tcph_chksum = 0; tcp->tcph_urgptr = 0; ip->iph_chksum = checksum ((unsigned short *) buffer, (sizeof (struct ipheader )+ sizeof (struct tcpheader))); /* Address family */ sin.sin_family = AF_INET; din.sin_family = AF_INET; /* Source port */ sin.sin_port = sport; din.sin_port = dport; /* Source IP */ sin.sin_addr.s_addr = sip; din.sin_addr.s_addr = dip; /* Tell the Kernel we're building our own packet */ if ((setsockopt(sock, IPPROTO_IP, IP_HDRINCL, (char *)&one, sizeof (one))) < 0) { printf("\nError: Can't set socketoptions\n\n"); return (-1); } /* Send */ if (sendto(sock, buffer, ip->iph_len, 0, (struct sockaddr *)&sin, sizeof(sin)) < 0) { printf("\nError: Can't send packet\n\n"); return (-1); } else printf("Packet sent to %s", dip); close(sock); } I was under the impression that: struct sockaddr_in, sin, din; would be sufficient, but it's obiously not. This is also the line the expected identifier error message points to. What am I missing?
c
tcp
network-programming
compiler-errors
null
null
open
Undeclared variable and expected identifier errors === I'm trying to create a program that will be able create and send tcp packages, but keep getting these errors when compiling. error: expected identifier or ‘(’ before ‘,’ token and error: ‘sin’ undeclared (first use in this function) error: ‘din’ undeclared (first use in this function) Now I'm sure these are the result of something really obvious, but I've stared myself blind on this piece of code and can't get my head around it. The function is as follows: int send_tcp() { int sock, one = 1; char buffer[PCKT_LEN]; struct sockaddr_in, sin, din; const int *val = &one; sock = socket(PF_INET, SOCK_RAW, IPPROTO_TCP); if (sock < 0) { printf("\nError: socket()\n\n"); exit (-1); } else printf ("\nsocket() - Using SOCK_RAW and TCP protocol is OK.\n\n"); /* Size of the headers */ struct ipheader *ip = (struct ipheader *) buffer; struct tcpheader *tcp = (struct tcpheader *) (buffer + sizeof (struct ipheader)); memset (buffer, 0, PCKT_LEN); /* IP attributes */ ip->iph_ihl = 5; ip->iph_ver = 4; ip->iph_tos = 16; ip->iph_len = sizeof(struct ipheader) + sizeof(struct tcpheader); ip->iph_id = htons(54321); ip->iph_offset = 0; ip->iph_ttl = 64; ip->iph_protocol = 6; ip->iph_chksum = 0; ip->iph_sourceip = sip; ip->iph_destip = dip; /* TCP attributes */ tcp->tcph_sourceport = sport; tcp->tcph_destport = dport; tcp->tcph_seqnum = htonl(1); tcp->tcph_acknum = 0; tcp->tcph_offset = 5; tcp->tcph_syn = 1; tcp->tcph_ack = 0; tcp->tcph_win = htons(32767); tcp->tcph_chksum = 0; tcp->tcph_urgptr = 0; ip->iph_chksum = checksum ((unsigned short *) buffer, (sizeof (struct ipheader )+ sizeof (struct tcpheader))); /* Address family */ sin.sin_family = AF_INET; din.sin_family = AF_INET; /* Source port */ sin.sin_port = sport; din.sin_port = dport; /* Source IP */ sin.sin_addr.s_addr = sip; din.sin_addr.s_addr = dip; /* Tell the Kernel we're building our own packet */ if ((setsockopt(sock, IPPROTO_IP, IP_HDRINCL, (char *)&one, sizeof (one))) < 0) { printf("\nError: Can't set socketoptions\n\n"); return (-1); } /* Send */ if (sendto(sock, buffer, ip->iph_len, 0, (struct sockaddr *)&sin, sizeof(sin)) < 0) { printf("\nError: Can't send packet\n\n"); return (-1); } else printf("Packet sent to %s", dip); close(sock); } I was under the impression that: struct sockaddr_in, sin, din; would be sufficient, but it's obiously not. This is also the line the expected identifier error message points to. What am I missing?
0
11,567,573
07/19/2012 19:02:36
805,293
06/19/2011 11:58:14
1
0
Android - How to deserialize xml with inline list using Simle api
I need to deserialize an xml response to an object, using simple api. When I deserialize an object, it works just fine, but when I try to deserialize an inline list, I get an exception: org.simpleframework.xml.core.ElementException: Element 'Person' does not have a match in class MyPersons at line 3. would appreciate a clue on what I am doing wrong or a working example for deserializing an inline list with complex objects. Thanks. Attached is a simplified example of my objects: my xml: <Persons> <Person> <Info> <ID>1</ID> <Name>A</Name> </Info> <Address>aaa</Address> <Products> <Product> <Name>foo</Name> <Product>foofoo</Product> </Product> <Product> <Name>bar</Category> <Product>barbar</Product> </Product> </Products> </Person> <Person> <Info> <ID>2</ID> <Name>B</Name> </Info> <Address>bbb</Address> <Products> <Product> <Name>foo2</Name> <Product>foofoo2</Product> </Product> <Product> <Name>bar2</Category> <Product>barbar2</Product> </Product> </Products> </Person> </Persons> my objects: @Root(name="Persons") public class MyPersons { @ElementList(inline=true) private List<Person> persons; } @Root public class Person { @Element private Info Info; @Element(required=false) private String Address; @ElementList private List<Product> Products; public Exhibitor(@Element(name="Info") Info Info){ this.Info = Info; //doing some logic } } public class Product { @Element private String Name; @Element private String Product; } @Root public class Info { @Element(required=false) private String ID; @Element private String Name; }
android
xml-deserialization
null
null
null
null
open
Android - How to deserialize xml with inline list using Simle api === I need to deserialize an xml response to an object, using simple api. When I deserialize an object, it works just fine, but when I try to deserialize an inline list, I get an exception: org.simpleframework.xml.core.ElementException: Element 'Person' does not have a match in class MyPersons at line 3. would appreciate a clue on what I am doing wrong or a working example for deserializing an inline list with complex objects. Thanks. Attached is a simplified example of my objects: my xml: <Persons> <Person> <Info> <ID>1</ID> <Name>A</Name> </Info> <Address>aaa</Address> <Products> <Product> <Name>foo</Name> <Product>foofoo</Product> </Product> <Product> <Name>bar</Category> <Product>barbar</Product> </Product> </Products> </Person> <Person> <Info> <ID>2</ID> <Name>B</Name> </Info> <Address>bbb</Address> <Products> <Product> <Name>foo2</Name> <Product>foofoo2</Product> </Product> <Product> <Name>bar2</Category> <Product>barbar2</Product> </Product> </Products> </Person> </Persons> my objects: @Root(name="Persons") public class MyPersons { @ElementList(inline=true) private List<Person> persons; } @Root public class Person { @Element private Info Info; @Element(required=false) private String Address; @ElementList private List<Product> Products; public Exhibitor(@Element(name="Info") Info Info){ this.Info = Info; //doing some logic } } public class Product { @Element private String Name; @Element private String Product; } @Root public class Info { @Element(required=false) private String ID; @Element private String Name; }
0
11,567,574
07/19/2012 19:02:45
1,121,123
12/29/2011 12:13:34
76
7
What graphic cards do Android emulator GPU emulation support?
I have HD7690M XT (an overclocked version of 6770M) and Android emulator (toolkit ) for ICS failed to start hardware OpenGL ES emulation with the following error message: emulator: ERROR: Could not load OpenGLES emulation library: Could not load DLL! emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. and with software renderer I got really bad color resolution (please see the attached screenshots). I suspect that this is due to the software renderer (no such problem in emulating earlier versions of Android). Have someone who can run hardware emulation seen this problem? ![enter image description here][1]![enter image description here][2] What graphic cards can hardware GPU emulation run on? (You can see detailed debug messages by executing `$ emulator -avd your_avd_name -verbose`) [1]: http://i.stack.imgur.com/iSIko.png [2]: http://i.stack.imgur.com/1qZdg.png
android-emulator
null
null
null
null
null
open
What graphic cards do Android emulator GPU emulation support? === I have HD7690M XT (an overclocked version of 6770M) and Android emulator (toolkit ) for ICS failed to start hardware OpenGL ES emulation with the following error message: emulator: ERROR: Could not load OpenGLES emulation library: Could not load DLL! emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. and with software renderer I got really bad color resolution (please see the attached screenshots). I suspect that this is due to the software renderer (no such problem in emulating earlier versions of Android). Have someone who can run hardware emulation seen this problem? ![enter image description here][1]![enter image description here][2] What graphic cards can hardware GPU emulation run on? (You can see detailed debug messages by executing `$ emulator -avd your_avd_name -verbose`) [1]: http://i.stack.imgur.com/iSIko.png [2]: http://i.stack.imgur.com/1qZdg.png
0
11,567,575
07/19/2012 19:02:47
1,469,779
06/20/2012 15:41:18
1
1
Backbone.js: render only last model in collection, display total number of models
I have a basic backbone.js app that renders a collection of models. I would like to modify to render only the last model, and also display a number for the total number of models. Here is my code so far: var Thing = Backbone.Model.extend({ }); var ThingView = Backbone.View.extend({ el: $('body'), template: _.template('<h3><%= title %></h3>'), render: function(){ var attributes = this.model.toJSON(); this.$el.append(this.template(attributes)); } }); var ThingsList = Backbone.Collection.extend({ model: Thing }); var things = [ { title: "Macbook Air", price: 799 }, { title: "Macbook Pro", price: 999 }, { title: "The new iPad", price: 399 }, { title: "Magic Mouse", price: 50 }, { title: "Cinema Display", price: 799 } ]; var thingsList = new ThingsList(things); var ThingsListView = Backbone.View.extend({ el: $('body'), render: function(){ _.each(this.collection.models, function (things) { this.renderThing(things); }, this); }, renderThing: function(things) { var thingView = new ThingView({ model: things }); this.$el.append(thingView.render()); } }); var thingsListView = new ThingsListView( {collection: thingsList} ); thingsListView.render();
backbone.js
null
null
null
null
null
open
Backbone.js: render only last model in collection, display total number of models === I have a basic backbone.js app that renders a collection of models. I would like to modify to render only the last model, and also display a number for the total number of models. Here is my code so far: var Thing = Backbone.Model.extend({ }); var ThingView = Backbone.View.extend({ el: $('body'), template: _.template('<h3><%= title %></h3>'), render: function(){ var attributes = this.model.toJSON(); this.$el.append(this.template(attributes)); } }); var ThingsList = Backbone.Collection.extend({ model: Thing }); var things = [ { title: "Macbook Air", price: 799 }, { title: "Macbook Pro", price: 999 }, { title: "The new iPad", price: 399 }, { title: "Magic Mouse", price: 50 }, { title: "Cinema Display", price: 799 } ]; var thingsList = new ThingsList(things); var ThingsListView = Backbone.View.extend({ el: $('body'), render: function(){ _.each(this.collection.models, function (things) { this.renderThing(things); }, this); }, renderThing: function(things) { var thingView = new ThingView({ model: things }); this.$el.append(thingView.render()); } }); var thingsListView = new ThingsListView( {collection: thingsList} ); thingsListView.render();
0
11,567,579
07/19/2012 19:02:57
330,271
05/01/2010 08:24:42
922
5
How to count the number of times a user_id is in a table?
Consider the following MySQL table: user_id ------- 1 1 2 3 3 3 3 I would like an output of: user_id cnt ------------- 1 2 2 1 3 4 I though this would make that happen, but it doesn't: SELECT user_id, COUNT(1) FROM table GROUP BY user_id What am I doing wrong?
mysql
null
null
null
null
null
open
How to count the number of times a user_id is in a table? === Consider the following MySQL table: user_id ------- 1 1 2 3 3 3 3 I would like an output of: user_id cnt ------------- 1 2 2 1 3 4 I though this would make that happen, but it doesn't: SELECT user_id, COUNT(1) FROM table GROUP BY user_id What am I doing wrong?
0
11,567,580
07/19/2012 19:03:02
1,538,860
07/19/2012 18:58:06
1
0
Illustrator JS script convert to After Effects
We are using a Scriptographer script in Illustrator to create a background pattern. We would like to animate this using After Effects but importing the still image Illustrator created doesn't cut it. Is there a way to import or convert a JS for Illustrator to a JS for After Effects? Any JS hackers you would recommend I could get in touch with?
javascript
adobe-illustrator
after-effects
null
null
null
open
Illustrator JS script convert to After Effects === We are using a Scriptographer script in Illustrator to create a background pattern. We would like to animate this using After Effects but importing the still image Illustrator created doesn't cut it. Is there a way to import or convert a JS for Illustrator to a JS for After Effects? Any JS hackers you would recommend I could get in touch with?
0
11,567,585
07/19/2012 19:03:12
987,103
10/10/2011 05:04:12
64
0
Why my listview adapter doesn't show the right layout on new view?
I have a custom Cursor Adapter that is based off of the MMS and SMS database in android. code looks like this as follows: @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { Message m = Message.getMessage(context, cursor); // gets message from cursor int t = m.getType(); // this gets the type of message it is .. 2 = recv, 1 = sent switch(t){ case Message.MMS_IN: // 128 return mInflater.inflate(R.layout.messagelist_item_recv, parent, false); case Message.MMS_OUT: // 132 return mInflater.inflate(R.layout.messagelist_item_sent, parent, false); case Message.SMS_IN: // 2 return mInflater.inflate(R.layout.messagelist_item_recv, parent, false); case Message.SMS_OUT: // 1 return mInflater.inflate(R.layout.messagelist_item_sent, parent, false); default: return null; } } The `R.layout.messagelist_item_sent` is for sent messages and the `R.layout.messagelist_item_recv` is for received messages. But looking at my messages, the rows that are first shown when the listview are shown correctly, but when I go up the listview to new views, the layouts are mixed up. The recv layout is where the sent layout is supposed to be and vice versa. Any one know why this kind of problem would be occuring?
java
android
null
null
null
null
open
Why my listview adapter doesn't show the right layout on new view? === I have a custom Cursor Adapter that is based off of the MMS and SMS database in android. code looks like this as follows: @Override public View newView(Context context, Cursor cursor, ViewGroup parent) { Message m = Message.getMessage(context, cursor); // gets message from cursor int t = m.getType(); // this gets the type of message it is .. 2 = recv, 1 = sent switch(t){ case Message.MMS_IN: // 128 return mInflater.inflate(R.layout.messagelist_item_recv, parent, false); case Message.MMS_OUT: // 132 return mInflater.inflate(R.layout.messagelist_item_sent, parent, false); case Message.SMS_IN: // 2 return mInflater.inflate(R.layout.messagelist_item_recv, parent, false); case Message.SMS_OUT: // 1 return mInflater.inflate(R.layout.messagelist_item_sent, parent, false); default: return null; } } The `R.layout.messagelist_item_sent` is for sent messages and the `R.layout.messagelist_item_recv` is for received messages. But looking at my messages, the rows that are first shown when the listview are shown correctly, but when I go up the listview to new views, the layouts are mixed up. The recv layout is where the sent layout is supposed to be and vice versa. Any one know why this kind of problem would be occuring?
0
11,734,218
07/31/2012 06:17:18
1,439,415
06/06/2012 09:51:48
1
1
URLConnection's getRequestProperty trims space
I am using URLConnection for calling servlet class at the server from client, where the value pass to the servlet as below : URLConnection urlc = null; url = new URL(urlString); urlc.setRequestProperty("test",value); // Here the value is "xyz " space at the end In the specific servlet, I am using test = (String) session.getAttribute("test"); // here I am getting "xyx" alone I want to have same value which is been entered from the client at the server's servlet class. How can I achieve it.
urlconnection
null
null
null
null
null
open
URLConnection's getRequestProperty trims space === I am using URLConnection for calling servlet class at the server from client, where the value pass to the servlet as below : URLConnection urlc = null; url = new URL(urlString); urlc.setRequestProperty("test",value); // Here the value is "xyz " space at the end In the specific servlet, I am using test = (String) session.getAttribute("test"); // here I am getting "xyx" alone I want to have same value which is been entered from the client at the server's servlet class. How can I achieve it.
0
11,734,220
07/31/2012 06:17:27
1,085,737
12/07/2011 13:55:22
59
2
Android: Exception Unmarshalling unknown type
I have to pass a ArrayList from one activity to another activity. So I use intent.putParcelableArrayListExtra("Items",sendinglist); And I get the sendinglist through ArrayList<GeoItem> revd = new ArrayList<GeoItem>(); Bundle b = getIntent().getExtras(); if (b != null) revd = b.getParcelableArrayList("Items"); But i cant access the GeoItem object in that list. My GeoItem class is public class GeoItem implements Parcelable { /** id of item. */ protected long id_; /** item location in GeoPoint. */ protected GeoPoint location_; /** selection state flag. true if selected.*/ protected boolean isSelected_; protected String incident_no; protected String title; protected String date; protected String address; /** * @param id item id. * @param latitudeE6 latitude of the item in microdegrees (degrees * 1E6). * @param longitudeE6 longitude of the item in microdegrees (degrees * 1E6). */ public GeoItem(long id, int latitudeE6, int longitudeE6,String inc_no,String tlt,String dates,String addr ) { id_ = id; location_ = new GeoPoint(latitudeE6, longitudeE6); isSelected_ = false; incident_no=inc_no; title=tlt; date=dates; address=addr; } public long getId_() { return id_; } public void setId_(long id_) { this.id_ = id_; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public void setIncident_no(String incident_no) { this.incident_no = incident_no; } /** * @param src source GeoItem */ public GeoItem(GeoItem src) { id_ = src.id_; location_ = new GeoPoint(src.location_.getLatitudeE6(),src.location_.getLongitudeE6()); isSelected_ = src.isSelected_; } /** * @param src source Parcel */ public GeoItem(Parcel src) { id_ = src.readLong(); location_ = new GeoPoint(src.readInt(), src.readInt()); isSelected_ = src.readInt() == 0 ? false : true; address=src.readString(); date=src.readString(); } /* describeContents */ public int describeContents() { return 0; } /** * getId * @return id of the item. */ public long getId() { return id_; } public String getIncident_no(){ return incident_no; } /** * setId * @param id of the item. */ public void setId(long id) { id_ = id;; } /** * getLocation * @return GeoPoint of the item. */ public GeoPoint getLocation() { return location_; } /** * isSelected * @return true if the item is in selected state. */ public boolean isSelected() { return isSelected_; } /** * setSelect * @param flg flag to be set. */ public void setSelect(boolean flg) { isSelected_ = flg; } /** * Parcelable.Creator */ public static final Parcelable.Creator<GeoItem> CREATOR = new Parcelable.Creator<GeoItem>() { public GeoItem createFromParcel(Parcel in) { return new GeoItem(in); } public GeoItem[] newArray(int size) { return new GeoItem[size]; } }; /** * writeToParcel * @param parcel Parcel to be written. * @param flags flag. */ public void writeToParcel(Parcel parcel, int flags) { parcel.writeLong(id_); parcel.writeString(address); parcel.writeString(date); parcel.writeInt(location_.getLatitudeE6()); parcel.writeInt(location_.getLongitudeE6()); int flg = isSelected_ ? 1 : 0; parcel.writeInt(flg); } } Please provide me the best way...
java
android
android-intent
null
null
null
open
Android: Exception Unmarshalling unknown type === I have to pass a ArrayList from one activity to another activity. So I use intent.putParcelableArrayListExtra("Items",sendinglist); And I get the sendinglist through ArrayList<GeoItem> revd = new ArrayList<GeoItem>(); Bundle b = getIntent().getExtras(); if (b != null) revd = b.getParcelableArrayList("Items"); But i cant access the GeoItem object in that list. My GeoItem class is public class GeoItem implements Parcelable { /** id of item. */ protected long id_; /** item location in GeoPoint. */ protected GeoPoint location_; /** selection state flag. true if selected.*/ protected boolean isSelected_; protected String incident_no; protected String title; protected String date; protected String address; /** * @param id item id. * @param latitudeE6 latitude of the item in microdegrees (degrees * 1E6). * @param longitudeE6 longitude of the item in microdegrees (degrees * 1E6). */ public GeoItem(long id, int latitudeE6, int longitudeE6,String inc_no,String tlt,String dates,String addr ) { id_ = id; location_ = new GeoPoint(latitudeE6, longitudeE6); isSelected_ = false; incident_no=inc_no; title=tlt; date=dates; address=addr; } public long getId_() { return id_; } public void setId_(long id_) { this.id_ = id_; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public void setIncident_no(String incident_no) { this.incident_no = incident_no; } /** * @param src source GeoItem */ public GeoItem(GeoItem src) { id_ = src.id_; location_ = new GeoPoint(src.location_.getLatitudeE6(),src.location_.getLongitudeE6()); isSelected_ = src.isSelected_; } /** * @param src source Parcel */ public GeoItem(Parcel src) { id_ = src.readLong(); location_ = new GeoPoint(src.readInt(), src.readInt()); isSelected_ = src.readInt() == 0 ? false : true; address=src.readString(); date=src.readString(); } /* describeContents */ public int describeContents() { return 0; } /** * getId * @return id of the item. */ public long getId() { return id_; } public String getIncident_no(){ return incident_no; } /** * setId * @param id of the item. */ public void setId(long id) { id_ = id;; } /** * getLocation * @return GeoPoint of the item. */ public GeoPoint getLocation() { return location_; } /** * isSelected * @return true if the item is in selected state. */ public boolean isSelected() { return isSelected_; } /** * setSelect * @param flg flag to be set. */ public void setSelect(boolean flg) { isSelected_ = flg; } /** * Parcelable.Creator */ public static final Parcelable.Creator<GeoItem> CREATOR = new Parcelable.Creator<GeoItem>() { public GeoItem createFromParcel(Parcel in) { return new GeoItem(in); } public GeoItem[] newArray(int size) { return new GeoItem[size]; } }; /** * writeToParcel * @param parcel Parcel to be written. * @param flags flag. */ public void writeToParcel(Parcel parcel, int flags) { parcel.writeLong(id_); parcel.writeString(address); parcel.writeString(date); parcel.writeInt(location_.getLatitudeE6()); parcel.writeInt(location_.getLongitudeE6()); int flg = isSelected_ ? 1 : 0; parcel.writeInt(flg); } } Please provide me the best way...
0
11,734,222
07/31/2012 06:17:32
916,144
08/28/2011 05:29:30
3,603
222
Invoking command processor from kernel-mode
I am currently developing a filter driver (kernel-mode) for a custom electronic device using WDK. **Reference**: http://msdn.microsoft.com/en-us/library/windows/hardware/gg463318.aspx Is it possible to invoke the command processor (similar to using the `system` function in usermode C) through the kernel-mode?
c
operating-system
kernel
driver
wdk
null
open
Invoking command processor from kernel-mode === I am currently developing a filter driver (kernel-mode) for a custom electronic device using WDK. **Reference**: http://msdn.microsoft.com/en-us/library/windows/hardware/gg463318.aspx Is it possible to invoke the command processor (similar to using the `system` function in usermode C) through the kernel-mode?
0
11,734,227
07/31/2012 06:18:12
862,795
07/26/2011 05:24:07
157
2
overriding operator to concat two byte array
i used the following code to concatenate two byte[] using override operator +. but there is an error i cannot understand. here is my method's header `public static byte[] operator +(byte[] bytaArray1, byte[] bytaArray2){...}` Error text: `One of the parameters of a binary operator must be the containing type` how should i implement this?
c#
overriding
null
null
null
null
open
overriding operator to concat two byte array === i used the following code to concatenate two byte[] using override operator +. but there is an error i cannot understand. here is my method's header `public static byte[] operator +(byte[] bytaArray1, byte[] bytaArray2){...}` Error text: `One of the parameters of a binary operator must be the containing type` how should i implement this?
0
11,717,868
07/30/2012 08:33:07
900,364
08/18/2011 10:05:33
99
13
Amazon FPS 400 Invalid Subscrption when Cancelling Valid Subscription
Thank you for taking the time to look at my question. I'm using django on an ubuntu box. I developed an 'upgrade account' feature for a client. The user clicks a button which then sends an api request to cancel their current subscription and redirects the user to amazon to create a new one. It worked perfectly in sandbox. In the first couple of weeks after deployment I've gotten a few errors from the cancel method: invalid subscription id. I checked the subscription id that was reported as invalid and it matches exactly to the subscription id on the client's amazon payment interface. Does anyone have any idea why this would happen? Below is the error message I received: Error Message: FPS Response Error: 400 ResponseError Undefined response error. Subscription Id xxxxxxxxxx is invalid. This has never been successful in production. I've also posted this question in the aws forum, with no response. Please help!!
django
api
amazon-web-services
http-status-code-400
amazon-fps
null
open
Amazon FPS 400 Invalid Subscrption when Cancelling Valid Subscription === Thank you for taking the time to look at my question. I'm using django on an ubuntu box. I developed an 'upgrade account' feature for a client. The user clicks a button which then sends an api request to cancel their current subscription and redirects the user to amazon to create a new one. It worked perfectly in sandbox. In the first couple of weeks after deployment I've gotten a few errors from the cancel method: invalid subscription id. I checked the subscription id that was reported as invalid and it matches exactly to the subscription id on the client's amazon payment interface. Does anyone have any idea why this would happen? Below is the error message I received: Error Message: FPS Response Error: 400 ResponseError Undefined response error. Subscription Id xxxxxxxxxx is invalid. This has never been successful in production. I've also posted this question in the aws forum, with no response. Please help!!
0