PostId int64 13 11.8M | PostCreationDate stringlengths 19 19 | OwnerUserId int64 3 1.57M | OwnerCreationDate stringlengths 10 19 | ReputationAtPostCreation int64 -33 210k | OwnerUndeletedAnswerCountAtPostTime int64 0 5.77k | Title stringlengths 10 250 | BodyMarkdown stringlengths 12 30k | Tag1 stringlengths 1 25 ⌀ | Tag2 stringlengths 1 25 ⌀ | Tag3 stringlengths 1 25 ⌀ | Tag4 stringlengths 1 25 ⌀ | Tag5 stringlengths 1 25 ⌀ | PostClosedDate stringlengths 19 19 ⌀ | OpenStatus stringclasses 5 values | unified_texts stringlengths 47 30.1k | OpenStatus_id int64 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,533,282 | 04/03/2011 23:39:24 | 690,358 | 04/03/2011 23:39:24 | 1 | 0 | HOW TO RETRIEVE THE DATA FROM AN ETHERNET PORT IN C LANGUAGE PROGRAMMING | I want to access the available data from my ethernet port through c program.
So anyone please help me in providing any simple "C" source codes for fetching the data from the ethernet ports.
Thanks | c | null | null | null | null | 04/04/2011 03:26:03 | not a real question | HOW TO RETRIEVE THE DATA FROM AN ETHERNET PORT IN C LANGUAGE PROGRAMMING
===
I want to access the available data from my ethernet port through c program.
So anyone please help me in providing any simple "C" source codes for fetching the data from the ethernet ports.
Thanks | 1 |
5,408,903 | 03/23/2011 17:00:45 | 87,302 | 04/05/2009 15:18:29 | 437 | 26 | What's easier custom .config file or use XML in asp.net | I have a situation where I temporarily need to save a bunch of settings to a new website.
Essentially one web service will make the site and it will dump a bunch of data.
I'd rather not store it in the site's app.config.
I could either save all the data as xml or make a file called install.config
Then later on the install wizard can reference it.
**MY question is, what's easier? using XML or reading from a custom config file?**
thanks! | c# | configuration-files | null | null | null | null | open | What's easier custom .config file or use XML in asp.net
===
I have a situation where I temporarily need to save a bunch of settings to a new website.
Essentially one web service will make the site and it will dump a bunch of data.
I'd rather not store it in the site's app.config.
I could either save all the data as xml or make a file called install.config
Then later on the install wizard can reference it.
**MY question is, what's easier? using XML or reading from a custom config file?**
thanks! | 0 |
9,649,481 | 03/10/2012 19:27:52 | 161,515 | 08/23/2009 09:22:26 | 439 | 19 | Expresscard SSD not recognized in Linux | I have a Verbatim SSD ExpressCard with an PCI Express Interface. When I boot to Windows it works OK on my HP Elitebook 8760W. In Linux I can't see it. It never becomes a device (/dev/) How can I make it work in Linux?
dmesg:
[ 3397.650048] pciehp 0000:00:1c.1:pcie04: Card present on Slot(1)
[ 3398.650703] pci 0000:03:00.0: [1987:5000] type 0 class 0x000101
[ 3398.650788] pci 0000:03:00.0: reg 10: [io 0x0000-0x0007]
[ 3398.650842] pci 0000:03:00.0: reg 14: [io 0x0000-0x0003]
[ 3398.650907] pci 0000:03:00.0: reg 18: [io 0x0000-0x0007]
[ 3398.650960] pci 0000:03:00.0: reg 1c: [io 0x0000-0x0003]
[ 3398.651014] pci 0000:03:00.0: reg 20: [io 0x0000-0x000f]
[ 3398.653608] pci 0000:03:00.0: BAR 4: assigned [io 0x2000-0x200f]
[ 3398.653634] pci 0000:03:00.0: BAR 4: set to [io 0x2000-0x200f] (PCI address [0x2000-0x200f])
[ 3398.653642] pci 0000:03:00.0: BAR 0: assigned [io 0x2010-0x2017]
[ 3398.653662] pci 0000:03:00.0: BAR 0: set to [io 0x2010-0x2017] (PCI address [0x2010-0x2017])
[ 3398.653669] pci 0000:03:00.0: BAR 2: assigned [io 0x2018-0x201f]
[ 3398.653689] pci 0000:03:00.0: BAR 2: set to [io 0x2018-0x201f] (PCI address [0x2018-0x201f])
[ 3398.653696] pci 0000:03:00.0: BAR 1: assigned [io 0x2020-0x2023]
[ 3398.653716] pci 0000:03:00.0: BAR 1: set to [io 0x2020-0x2023] (PCI address [0x2020-0x2023])
[ 3398.653723] pci 0000:03:00.0: BAR 3: assigned [io 0x2024-0x2027]
[ 3398.653743] pci 0000:03:00.0: BAR 3: set to [io 0x2024-0x2027] (PCI address [0x2024-0x2027])
[ 3398.653752] pcieport 0000:00:1c.1: PCI bridge to [bus 03-23]
[ 3398.653760] pcieport 0000:00:1c.1: bridge window [io 0x2000-0x3fff]
[ 3398.653772] pcieport 0000:00:1c.1: bridge window [mem 0xcc000000-0xcfffffff]
[ 3398.653782] pcieport 0000:00:1c.1: bridge window [mem 0xd2800000-0xd29fffff 64bit pref]
[ 3398.653811] pcieport 0000:00:1c.1: setting latency timer to 64
[ 3398.654202] pata_acpi 0000:03:00.0: enabling device (0000 -> 0001)
[ 3398.654223] pata_acpi 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 3398.654301] pata_acpi 0000:03:00.0: setting latency timer to 64
[ 3398.654339] pata_acpi 0000:03:00.0: PCI INT A disabled
When I have the SSD plugged in I get this line in lspci that I otherwise do not:
03:00.0 IDE interface: Device 1987:5000 (rev 01)
Any ideas? | linux | ssd | null | null | null | 03/10/2012 19:36:53 | off topic | Expresscard SSD not recognized in Linux
===
I have a Verbatim SSD ExpressCard with an PCI Express Interface. When I boot to Windows it works OK on my HP Elitebook 8760W. In Linux I can't see it. It never becomes a device (/dev/) How can I make it work in Linux?
dmesg:
[ 3397.650048] pciehp 0000:00:1c.1:pcie04: Card present on Slot(1)
[ 3398.650703] pci 0000:03:00.0: [1987:5000] type 0 class 0x000101
[ 3398.650788] pci 0000:03:00.0: reg 10: [io 0x0000-0x0007]
[ 3398.650842] pci 0000:03:00.0: reg 14: [io 0x0000-0x0003]
[ 3398.650907] pci 0000:03:00.0: reg 18: [io 0x0000-0x0007]
[ 3398.650960] pci 0000:03:00.0: reg 1c: [io 0x0000-0x0003]
[ 3398.651014] pci 0000:03:00.0: reg 20: [io 0x0000-0x000f]
[ 3398.653608] pci 0000:03:00.0: BAR 4: assigned [io 0x2000-0x200f]
[ 3398.653634] pci 0000:03:00.0: BAR 4: set to [io 0x2000-0x200f] (PCI address [0x2000-0x200f])
[ 3398.653642] pci 0000:03:00.0: BAR 0: assigned [io 0x2010-0x2017]
[ 3398.653662] pci 0000:03:00.0: BAR 0: set to [io 0x2010-0x2017] (PCI address [0x2010-0x2017])
[ 3398.653669] pci 0000:03:00.0: BAR 2: assigned [io 0x2018-0x201f]
[ 3398.653689] pci 0000:03:00.0: BAR 2: set to [io 0x2018-0x201f] (PCI address [0x2018-0x201f])
[ 3398.653696] pci 0000:03:00.0: BAR 1: assigned [io 0x2020-0x2023]
[ 3398.653716] pci 0000:03:00.0: BAR 1: set to [io 0x2020-0x2023] (PCI address [0x2020-0x2023])
[ 3398.653723] pci 0000:03:00.0: BAR 3: assigned [io 0x2024-0x2027]
[ 3398.653743] pci 0000:03:00.0: BAR 3: set to [io 0x2024-0x2027] (PCI address [0x2024-0x2027])
[ 3398.653752] pcieport 0000:00:1c.1: PCI bridge to [bus 03-23]
[ 3398.653760] pcieport 0000:00:1c.1: bridge window [io 0x2000-0x3fff]
[ 3398.653772] pcieport 0000:00:1c.1: bridge window [mem 0xcc000000-0xcfffffff]
[ 3398.653782] pcieport 0000:00:1c.1: bridge window [mem 0xd2800000-0xd29fffff 64bit pref]
[ 3398.653811] pcieport 0000:00:1c.1: setting latency timer to 64
[ 3398.654202] pata_acpi 0000:03:00.0: enabling device (0000 -> 0001)
[ 3398.654223] pata_acpi 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 3398.654301] pata_acpi 0000:03:00.0: setting latency timer to 64
[ 3398.654339] pata_acpi 0000:03:00.0: PCI INT A disabled
When I have the SSD plugged in I get this line in lspci that I otherwise do not:
03:00.0 IDE interface: Device 1987:5000 (rev 01)
Any ideas? | 2 |
472,059 | 01/23/2009 06:22:10 | 53,747 | 01/10/2009 19:32:50 | 10 | 2 | FilteringSelect with a QueryReadStore: unexpected behaviour | I am using a `dijit.form.FilteringSelect` backed by a `dojox.data.QueryReadStore` in order to allow the user to select a region (think "auto-complete" mechanism). On each character entered by the user, the `QueryReadStore` sends a request to the server, awaiting a json list of matching regions (with associated IDs). By the time a short enough list is shown, the user picks the desired item. [Admittedly, querying on every keystroke is not the most efficient pattern, but it's good enough for now.]
Unexpected behaviour: in some rare but specific occasions, the choice made by the user "doesn't stick". For instance, if the user types "`can`", she is presented with the following choices in that order:
Atlantic Canada
Canada
English Canada
Lower Canada
Upper Canada
Western Canada
If she chooses "`Canada`" among these, the dijit closes the drop down selection, having correctly selected her choice. But by the time the user leaves the field, the selection reverts to "`Atlantic Canada`"!
That bizarre phenomenon occurs systematically for a small number of specific regions. (At first, I thought that the common factor between those badly behaved regions was that their name contained accented characters or hyphens, but clearly not so with the Canadian example. So far, I fail to spot a regular pattern.)
I have not found any mention of a similar problem anywhere. I am quite willing to investigate, but, as I am new to dojo, I would really appreciate pointers before I resort to delving inside dojo's code: where should I first look? what are some likely problems that could cause that behaviour? can i rule out certain hypotheses? how should I best use the console (or Firebug) to get to the bottom of this? etc.
The problem occurs with both dojo 1.1.1 and dojo 1.2.3.
Here is the (programmatic) generation of the `FilteringSelect`:
new dijit.form.FilteringSelect({
name = "region";
autoComplete = false;
hasDownArrow = false;
labelAttr = "name";
queryExpr = "\${0}";
store = new dojox.data.QueryReadStore({url:'/query/regions'});
}, myNode);
| dojo | dojox | autocomplete | json | dijit | null | open | FilteringSelect with a QueryReadStore: unexpected behaviour
===
I am using a `dijit.form.FilteringSelect` backed by a `dojox.data.QueryReadStore` in order to allow the user to select a region (think "auto-complete" mechanism). On each character entered by the user, the `QueryReadStore` sends a request to the server, awaiting a json list of matching regions (with associated IDs). By the time a short enough list is shown, the user picks the desired item. [Admittedly, querying on every keystroke is not the most efficient pattern, but it's good enough for now.]
Unexpected behaviour: in some rare but specific occasions, the choice made by the user "doesn't stick". For instance, if the user types "`can`", she is presented with the following choices in that order:
Atlantic Canada
Canada
English Canada
Lower Canada
Upper Canada
Western Canada
If she chooses "`Canada`" among these, the dijit closes the drop down selection, having correctly selected her choice. But by the time the user leaves the field, the selection reverts to "`Atlantic Canada`"!
That bizarre phenomenon occurs systematically for a small number of specific regions. (At first, I thought that the common factor between those badly behaved regions was that their name contained accented characters or hyphens, but clearly not so with the Canadian example. So far, I fail to spot a regular pattern.)
I have not found any mention of a similar problem anywhere. I am quite willing to investigate, but, as I am new to dojo, I would really appreciate pointers before I resort to delving inside dojo's code: where should I first look? what are some likely problems that could cause that behaviour? can i rule out certain hypotheses? how should I best use the console (or Firebug) to get to the bottom of this? etc.
The problem occurs with both dojo 1.1.1 and dojo 1.2.3.
Here is the (programmatic) generation of the `FilteringSelect`:
new dijit.form.FilteringSelect({
name = "region";
autoComplete = false;
hasDownArrow = false;
labelAttr = "name";
queryExpr = "\${0}";
store = new dojox.data.QueryReadStore({url:'/query/regions'});
}, myNode);
| 0 |
8,744,951 | 01/05/2012 15:23:03 | 485,115 | 10/23/2010 15:15:25 | 854 | 29 | Scala releases roadmap | What's the current Scala roadmap? When are Scala 2.10 release and RC's comming?
Unfortunately I wasn't able to find any useful information on the web | scala | release | null | null | null | 01/05/2012 20:27:14 | off topic | Scala releases roadmap
===
What's the current Scala roadmap? When are Scala 2.10 release and RC's comming?
Unfortunately I wasn't able to find any useful information on the web | 2 |
11,271,580 | 06/30/2012 05:03:47 | 1,118,485 | 12/28/2011 00:25:06 | 570 | 0 | Does you know a math worksheet generator? | I'm trying to generate a software very similiar like this one:
http://www.schoolhousetech.com/Math/
Please watch the trial software.
My idea is about to create worksheets with problems, but these problems must be resolved by the user in the computer.. not for print it!
This was my first post about the idea. http://programmers.stackexchange.com/questions/154798/design-suggestions-needed-to-create-a-mathbuilder-framework
In respect to the last post. I just want to know which parts or classes (model classes) I was forgetting in the model. | oop | design-patterns | design | worksheet | null | 07/05/2012 01:37:49 | not a real question | Does you know a math worksheet generator?
===
I'm trying to generate a software very similiar like this one:
http://www.schoolhousetech.com/Math/
Please watch the trial software.
My idea is about to create worksheets with problems, but these problems must be resolved by the user in the computer.. not for print it!
This was my first post about the idea. http://programmers.stackexchange.com/questions/154798/design-suggestions-needed-to-create-a-mathbuilder-framework
In respect to the last post. I just want to know which parts or classes (model classes) I was forgetting in the model. | 1 |
9,960,771 | 04/01/2012 00:02:41 | 1,053,949 | 11/18/2011 14:05:50 | 46 | 5 | Jquery Thumbnail images slideshow | I have created jquery image slider and it is working good. However i have problems with showing <b>thumbnail</b> images in my slider. This is my problem: under my slider are four thumbnail images and on every slide you can see witch image is "active" but my thumbnails (for now they are just letters) are working only until <b>last slide</b> and then it brakes:(
<br/>Here is <b><a href="http://jsfiddle.net/MhFnR/">THE FIDDLE</a></b> with full code.
Here's my code for selecting thumbnails:
Can someone help me please?
Thank you!!!
/*CODE WORKING UNTIL LAST SLIDE*/
$('.control_active').removeClass('control_active').next('li').addClass('control_active');
<!--------------------------------------------------------------------------------->
| jquery | null | null | null | null | null | open | Jquery Thumbnail images slideshow
===
I have created jquery image slider and it is working good. However i have problems with showing <b>thumbnail</b> images in my slider. This is my problem: under my slider are four thumbnail images and on every slide you can see witch image is "active" but my thumbnails (for now they are just letters) are working only until <b>last slide</b> and then it brakes:(
<br/>Here is <b><a href="http://jsfiddle.net/MhFnR/">THE FIDDLE</a></b> with full code.
Here's my code for selecting thumbnails:
Can someone help me please?
Thank you!!!
/*CODE WORKING UNTIL LAST SLIDE*/
$('.control_active').removeClass('control_active').next('li').addClass('control_active');
<!--------------------------------------------------------------------------------->
| 0 |
7,991,063 | 11/03/2011 06:33:22 | 981,355 | 10/05/2011 23:21:40 | 8 | 0 | Recommended Reading for Java Concurrency |
[The Java Tutorials][1] listed a couple of books for futhur reading on the topic on Concurrency:
1. Concurrent Programming in Java: Design Principles and Pattern
1. Java Concurrency in Practice
1. Concurrency: State Models & Java Programs
As much as I would like to go through all 3 of them, it is not really feasible with my current schedule.
For those who have read, which would you recommend out of the three?
[1]: http://download.oracle.com/javase/tutorial/essential/concurrency/further.html | java | multithreading | null | null | null | 11/03/2011 07:17:34 | not constructive | Recommended Reading for Java Concurrency
===
[The Java Tutorials][1] listed a couple of books for futhur reading on the topic on Concurrency:
1. Concurrent Programming in Java: Design Principles and Pattern
1. Java Concurrency in Practice
1. Concurrency: State Models & Java Programs
As much as I would like to go through all 3 of them, it is not really feasible with my current schedule.
For those who have read, which would you recommend out of the three?
[1]: http://download.oracle.com/javase/tutorial/essential/concurrency/further.html | 4 |
4,957,818 | 02/10/2011 13:44:17 | 377,678 | 06/28/2010 01:39:56 | 22 | 1 | JBoss - books/reference materials | Can you let me know which would be a good book / reference for getting started with Jboss.
Thanks,<br/>
Sivakumar. | jboss | null | null | null | null | 09/30/2011 12:17:25 | not constructive | JBoss - books/reference materials
===
Can you let me know which would be a good book / reference for getting started with Jboss.
Thanks,<br/>
Sivakumar. | 4 |
9,065,101 | 01/30/2012 14:08:18 | 1,040,934 | 11/11/2011 02:17:06 | 93 | 3 | How to change default message of reCAPTCHA,.? | I'd like to change default error message of reCAPTCHA plugin from "Incorrect Security Image Response". How I can do that,.?
I'm using PHP and CI framework,.
thanks,. | php | error-message | recaptcha | null | null | null | open | How to change default message of reCAPTCHA,.?
===
I'd like to change default error message of reCAPTCHA plugin from "Incorrect Security Image Response". How I can do that,.?
I'm using PHP and CI framework,.
thanks,. | 0 |
7,423,395 | 09/14/2011 21:49:05 | 945,596 | 09/14/2011 21:49:05 | 1 | 0 | Prevent Phonegap to slide (iFrames) | I've a question.
I wrote a small app in Dreamweaver CS 5.5, to export it using Phonegap's SKD to an iOS app.
But the problem is: How can I prevent the user from moving the screen up and down when he slides with his fingers? I read on the Phonegap wiki that it is possible with DIV tags. But that won't work for me, because I use an index.html who reffers to frames. I don't use the the body. How can I prevent the user from slide the screen up and down?
Thank you!
index.html:
<html>
<frameset cols="625,*" border=0 framespacing=0 frameborder="0">
<frame src="frames/navbar.htm" scrolling=auto name="main">
<frame src="frames/blank.htm" scrolling=auto>
</frameset>
</frameset>
</frameset>
</html> | ios | null | null | null | null | null | open | Prevent Phonegap to slide (iFrames)
===
I've a question.
I wrote a small app in Dreamweaver CS 5.5, to export it using Phonegap's SKD to an iOS app.
But the problem is: How can I prevent the user from moving the screen up and down when he slides with his fingers? I read on the Phonegap wiki that it is possible with DIV tags. But that won't work for me, because I use an index.html who reffers to frames. I don't use the the body. How can I prevent the user from slide the screen up and down?
Thank you!
index.html:
<html>
<frameset cols="625,*" border=0 framespacing=0 frameborder="0">
<frame src="frames/navbar.htm" scrolling=auto name="main">
<frame src="frames/blank.htm" scrolling=auto>
</frameset>
</frameset>
</frameset>
</html> | 0 |
867,163 | 05/15/2009 06:00:38 | 68,119 | 02/18/2009 23:30:16 | 9 | 1 | The AJAX response: Data (JSON, XML) or HTML snippet? | I'm just wondering what is an "ideal" output format for the AJAX response? Pure data (JSON, XML) rendered into the page using some client-side JavaScript template engine? Or an HTML snippet rendered into the page "as-is"?
What is your preference and why? | ajax | html | json | xml | client-server | null | open | The AJAX response: Data (JSON, XML) or HTML snippet?
===
I'm just wondering what is an "ideal" output format for the AJAX response? Pure data (JSON, XML) rendered into the page using some client-side JavaScript template engine? Or an HTML snippet rendered into the page "as-is"?
What is your preference and why? | 0 |
3,900,133 | 10/10/2010 11:35:48 | 470,370 | 10/08/2010 15:08:11 | 1 | 0 | How to use a file-resource instead of a classpath-resource in ibatis sqlMap config? | I'd like to use the same ibatis sqlMapConfig on many modules.
Unfortunatly only classpath-resources seems to be allowed in the resource-attribute of my sqlMap:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="myresource.xml" />
</sqlMapConfig>
This does not work:
<sqlMap resource="file:/myresource.xml" />
Is there any way to avoid duplicity (using one ibatis-config on many classpathes)? | java | ibatis | null | null | null | null | open | How to use a file-resource instead of a classpath-resource in ibatis sqlMap config?
===
I'd like to use the same ibatis sqlMapConfig on many modules.
Unfortunatly only classpath-resources seems to be allowed in the resource-attribute of my sqlMap:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<sqlMap resource="myresource.xml" />
</sqlMapConfig>
This does not work:
<sqlMap resource="file:/myresource.xml" />
Is there any way to avoid duplicity (using one ibatis-config on many classpathes)? | 0 |
6,935,520 | 08/04/2011 02:26:02 | 877,735 | 08/04/2011 02:18:44 | 1 | 0 | Cannot set 'NumberFormat' property from right-click action | All,
Please see my code below, which simply inserts a formula into a given cell and performs some formatting. I run this code from a form that launches from the ribbon, and it works just fine. I have also created a right-click command bar to run the Sub without going through the form. When it runs from right-click, everything works EXCEPT for changing the NumberFormat, and I have no idea why. Can someone please help?
Thank you in advance.
Public Sub Sum_Insertion(ByVal Sum_Ins As Integer)
RC_Counter = RC_Counter + 1
Set C = ActiveCell
If RC_Counter Mod 2 = 0 Then
With C
.Formula = "=SUM(SUM_" & Sum_Ins & ")"
If Err.Number > 0 Then Exit Sub
.Font.Name = "symbol"
.Font.Color = ColorLevel
.NumberFormat = """å(" & Sum_Ins & ")=""#,##0_);""å(" & Sum_Ins & ")=""(#,##0)"
End With
ActiveSheet.Calculate
End If
End Sub | excel-vba | numberformat | right-click | null | null | null | open | Cannot set 'NumberFormat' property from right-click action
===
All,
Please see my code below, which simply inserts a formula into a given cell and performs some formatting. I run this code from a form that launches from the ribbon, and it works just fine. I have also created a right-click command bar to run the Sub without going through the form. When it runs from right-click, everything works EXCEPT for changing the NumberFormat, and I have no idea why. Can someone please help?
Thank you in advance.
Public Sub Sum_Insertion(ByVal Sum_Ins As Integer)
RC_Counter = RC_Counter + 1
Set C = ActiveCell
If RC_Counter Mod 2 = 0 Then
With C
.Formula = "=SUM(SUM_" & Sum_Ins & ")"
If Err.Number > 0 Then Exit Sub
.Font.Name = "symbol"
.Font.Color = ColorLevel
.NumberFormat = """å(" & Sum_Ins & ")=""#,##0_);""å(" & Sum_Ins & ")=""(#,##0)"
End With
ActiveSheet.Calculate
End If
End Sub | 0 |
11,414,748 | 07/10/2012 13:47:39 | 1,514,947 | 07/10/2012 13:40:56 | 1 | 0 | Type multiline equation in a table in Latex | who knows the way to write a multiline equation in a table?
I am using the code below:
`\begin{table}
\centering
\begin{tabular}{|c| c| c|}
\hline %inserts horizontal line
&f1& f2 \\ [0.5ex]
\hline
a& b& c\\ \hline
d& e & f \hline
\end{tabular}
\label{label 1}
\end{table}`
but b and e are two or maybe three line equations.
How can I write them in my table? | table | latex | multiline | null | null | 07/11/2012 11:11:01 | off topic | Type multiline equation in a table in Latex
===
who knows the way to write a multiline equation in a table?
I am using the code below:
`\begin{table}
\centering
\begin{tabular}{|c| c| c|}
\hline %inserts horizontal line
&f1& f2 \\ [0.5ex]
\hline
a& b& c\\ \hline
d& e & f \hline
\end{tabular}
\label{label 1}
\end{table}`
but b and e are two or maybe three line equations.
How can I write them in my table? | 2 |
10,139,073 | 04/13/2012 10:21:29 | 1,328,587 | 04/12/2012 08:48:30 | 19 | 1 | Why Not factory Pattern For Sorting | **What i want** : On run time , based on user behavior and history, i need to perform a sorting operation.In my case , SortByDate/SortByDemand/SortByConsumption will just return the string or we can say order by clause(which can be complex).
In Most of the forums , i have found Strategy pattern should be used for sorting.
![enter image description here][1]
I have Attached the image for Strategy pattern here
Util class will call the object of one the three classes i.e SortByDate/SortByDemand/SortByConsumption
So every-time a new method of sorting is defined. I need to change the util class and define a new Strategy.
![enter image description here][2]
If however i implemented it using factory, the util class just need to call the factory and it will take care of which class to call.
So i thing i should use factory.
**However i hv read that strategy is best pattern for such needs.
can anyone help me why strategy pattern is better here and why ??**
[1]: http://i.stack.imgur.com/GcSQA.png
[2]: http://i.stack.imgur.com/K0AFq.png | php | design | design-patterns | null | null | 04/14/2012 13:07:49 | not constructive | Why Not factory Pattern For Sorting
===
**What i want** : On run time , based on user behavior and history, i need to perform a sorting operation.In my case , SortByDate/SortByDemand/SortByConsumption will just return the string or we can say order by clause(which can be complex).
In Most of the forums , i have found Strategy pattern should be used for sorting.
![enter image description here][1]
I have Attached the image for Strategy pattern here
Util class will call the object of one the three classes i.e SortByDate/SortByDemand/SortByConsumption
So every-time a new method of sorting is defined. I need to change the util class and define a new Strategy.
![enter image description here][2]
If however i implemented it using factory, the util class just need to call the factory and it will take care of which class to call.
So i thing i should use factory.
**However i hv read that strategy is best pattern for such needs.
can anyone help me why strategy pattern is better here and why ??**
[1]: http://i.stack.imgur.com/GcSQA.png
[2]: http://i.stack.imgur.com/K0AFq.png | 4 |
2,919,256 | 05/27/2010 07:33:09 | 351,698 | 05/27/2010 07:33:09 | 1 | 0 | dropdown selected value from database | In edit profile form I want to display selected value of Country dropdown list as value saved in db and user can change that also. | php | null | null | null | null | 05/14/2012 14:36:31 | not a real question | dropdown selected value from database
===
In edit profile form I want to display selected value of Country dropdown list as value saved in db and user can change that also. | 1 |
865,328 | 05/14/2009 19:48:20 | 97,926 | 04/29/2009 19:51:59 | 207 | 28 | which design pattern i should follow to develope asp.net application? |
There are lots of design patterns are available for developing the asp.net site. Every one design patterns are having their pros and cons. I want to develop high performance application using asp.net. Which pattern i should follow? | asp.net | null | null | null | null | null | open | which design pattern i should follow to develope asp.net application?
===
There are lots of design patterns are available for developing the asp.net site. Every one design patterns are having their pros and cons. I want to develop high performance application using asp.net. Which pattern i should follow? | 0 |
2,378,576 | 03/04/2010 10:46:24 | 263,580 | 02/01/2010 14:44:02 | 71 | 1 | best practice with tagclouds or tagCloud logic ? | what are some good tag Cloud logic that you had come up with? like fontsize = factor * percentageOfOccurance .... | php | design | null | null | null | null | open | best practice with tagclouds or tagCloud logic ?
===
what are some good tag Cloud logic that you had come up with? like fontsize = factor * percentageOfOccurance .... | 0 |
8,111,613 | 11/13/2011 12:46:44 | 554,217 | 12/26/2010 09:29:16 | 601 | 6 | failing to import javascript css files | I look at this site:
http://markitup.jaysalvat.com/examples/bbcode/
and tried to do this:
<link rel="stylesheet" type="text/css" href="../latest/markitup/skins/markitup/style.css" />
<link rel="stylesheet" type="text/css" href="../latest/markitup/sets/default/style.css" />
<script type="text/javascript" src="../jquery.js"></script>
<script type="text/javascript" src="../latest/markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="../latest/markitup/sets/default/set.js"></script>
<script language="javascript">
$(document).ready(function() {
$('#bbcode').markItUp(myBbcodeSettings);
});
</script>
</head>
<body>
<br/> <br/> <br/> <br/> <br/>
<table width="600" align="center">
<tr>
<td>
Title:
</td>
<td>
<input type="text" name="title" style="width:660px"/>
</td>
</tr>
<tr>
<td valign="top">
Message:
</td>
<td>
<textarea id="bbcode" cols="80" rows="20">
...BBCode stuff...
</textarea>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" name="send" value="send"/>
</td>
</tr>
</table>
</body>
</html>
The problem is that no style is being applied (there is also a jason file, but I dont care, it should work, as it refers to the same id in the javascript command.
I checked the links..they are relative to their root..I dont understand, why I get a mistake!!! | php | javascript | html | null | null | null | open | failing to import javascript css files
===
I look at this site:
http://markitup.jaysalvat.com/examples/bbcode/
and tried to do this:
<link rel="stylesheet" type="text/css" href="../latest/markitup/skins/markitup/style.css" />
<link rel="stylesheet" type="text/css" href="../latest/markitup/sets/default/style.css" />
<script type="text/javascript" src="../jquery.js"></script>
<script type="text/javascript" src="../latest/markitup/jquery.markitup.js"></script>
<script type="text/javascript" src="../latest/markitup/sets/default/set.js"></script>
<script language="javascript">
$(document).ready(function() {
$('#bbcode').markItUp(myBbcodeSettings);
});
</script>
</head>
<body>
<br/> <br/> <br/> <br/> <br/>
<table width="600" align="center">
<tr>
<td>
Title:
</td>
<td>
<input type="text" name="title" style="width:660px"/>
</td>
</tr>
<tr>
<td valign="top">
Message:
</td>
<td>
<textarea id="bbcode" cols="80" rows="20">
...BBCode stuff...
</textarea>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" name="send" value="send"/>
</td>
</tr>
</table>
</body>
</html>
The problem is that no style is being applied (there is also a jason file, but I dont care, it should work, as it refers to the same id in the javascript command.
I checked the links..they are relative to their root..I dont understand, why I get a mistake!!! | 0 |
11,396,557 | 07/09/2012 14:00:11 | 1,453,787 | 06/13/2012 13:37:43 | 1 | 0 | How to do the Skip logic in Survey? | i have a 4 questions in survey. if the nextquestion is highlighter, i want to check if the parent question of highlighter has skip enabled.
Can anyone plz help to do this | android | null | null | null | null | 07/10/2012 03:21:30 | not a real question | How to do the Skip logic in Survey?
===
i have a 4 questions in survey. if the nextquestion is highlighter, i want to check if the parent question of highlighter has skip enabled.
Can anyone plz help to do this | 1 |
4,918,756 | 02/07/2011 06:57:04 | 352,707 | 05/14/2010 06:24:01 | 71 | 0 | How to implement thread concept in Android application? | I have implemented one basic android applicaiton.In which I want to using thread concept.
When application will open then one splash screen display for some time (3 seconds) and then open new view.
I know how to open next view but I dont know how to display splash screen for 3 seconds.
Pleas give me idea about that.
Thanks in advance. | android | null | null | null | null | null | open | How to implement thread concept in Android application?
===
I have implemented one basic android applicaiton.In which I want to using thread concept.
When application will open then one splash screen display for some time (3 seconds) and then open new view.
I know how to open next view but I dont know how to display splash screen for 3 seconds.
Pleas give me idea about that.
Thanks in advance. | 0 |
6,780,587 | 07/21/2011 18:05:36 | 20,126 | 09/21/2008 23:21:25 | 5,407 | 290 | What is the standard, to put the logo image in the css or as an img tag? | I see some websites put the logo of the website inside an img html tag, and some such as SO and twitter, put it in the css as background-image.
Which way is better and why regarding html/css standards, usability and SEO?
| html | css | seo | usability | null | 07/21/2011 18:10:53 | not constructive | What is the standard, to put the logo image in the css or as an img tag?
===
I see some websites put the logo of the website inside an img html tag, and some such as SO and twitter, put it in the css as background-image.
Which way is better and why regarding html/css standards, usability and SEO?
| 4 |
5,645,938 | 04/13/2011 07:42:45 | 442,060 | 09/08/2010 05:11:49 | 6 | 0 | Need some help!! | Sorry, this question might sound silly, but i need some help!
My project is to open a directory and list all the files. These are csv files. Each file is opened and the contents are loaded into the table in mysql database.
So i have done the above said steps and my java code works fine. For instance, i have 3 files in the directory. When i run the project, the values in each of the 3 files are loaded into the mysql table.
But when i run the program again and check the database using Select statement, it shows me the repeated data and hence the values of 6 files are loaded. When I run it again, the database shows 9 files. But i dont want the files to be added again.
So can anyone please tell me about how to achieve this without the need to delete the already added files from the directory.
Thanks in advance1 | java | mysql | jdbc | null | null | 05/06/2011 07:37:38 | not a real question | Need some help!!
===
Sorry, this question might sound silly, but i need some help!
My project is to open a directory and list all the files. These are csv files. Each file is opened and the contents are loaded into the table in mysql database.
So i have done the above said steps and my java code works fine. For instance, i have 3 files in the directory. When i run the project, the values in each of the 3 files are loaded into the mysql table.
But when i run the program again and check the database using Select statement, it shows me the repeated data and hence the values of 6 files are loaded. When I run it again, the database shows 9 files. But i dont want the files to be added again.
So can anyone please tell me about how to achieve this without the need to delete the already added files from the directory.
Thanks in advance1 | 1 |
9,909,575 | 03/28/2012 14:25:39 | 1,008,572 | 10/22/2011 13:15:45 | 97 | 2 | How do I update a column in a table in MySQL using EclipseLink? | I am wondering how I can update a column in a table with EclipseLink.
I tried using <code>EntityManager.merge(myObject);</code> but then EclipseLink crashed.
I tried to add the <code>@ChangeTracking</code> property to my class I want to update, but it didn´t work and I even don´t know if that is the correct way to do it.
So how can I update just a single column in a table using EclipseLink? | java | mysql | web-services | eclipselink | sql-update | null | open | How do I update a column in a table in MySQL using EclipseLink?
===
I am wondering how I can update a column in a table with EclipseLink.
I tried using <code>EntityManager.merge(myObject);</code> but then EclipseLink crashed.
I tried to add the <code>@ChangeTracking</code> property to my class I want to update, but it didn´t work and I even don´t know if that is the correct way to do it.
So how can I update just a single column in a table using EclipseLink? | 0 |
6,094,445 | 05/23/2011 08:03:32 | 765,346 | 05/23/2011 02:33:30 | 103 | 0 | Which joomla extensions should be installed on every joomla site | I want to know that as a web developer which joomla extensions one should install onany website to start with.
E,g i i always install JCE editor , ExtPlorer , joomMyadmin and then i proceed further. Any more suggestions | php | joomla | null | null | null | 05/23/2011 13:05:24 | off topic | Which joomla extensions should be installed on every joomla site
===
I want to know that as a web developer which joomla extensions one should install onany website to start with.
E,g i i always install JCE editor , ExtPlorer , joomMyadmin and then i proceed further. Any more suggestions | 2 |
3,688,296 | 09/10/2010 20:58:22 | 444,747 | 09/10/2010 20:58:22 | 1 | 0 | What is padding? | What is ment when padding is said, referencing to a exploit?
Thanks | padding | exploits | null | null | null | 09/10/2010 21:19:44 | not a real question | What is padding?
===
What is ment when padding is said, referencing to a exploit?
Thanks | 1 |
7,156,225 | 08/23/2011 04:20:34 | 817,283 | 06/27/2011 11:45:44 | 6 | 0 | Precision,Recall and F-score | I am working on a developing a new system which is based on information retrieval concept. My system retrieve's pdf and ppt files of research articles from the web. When i calculated precision,recall and f-score of the system, i had arrived at doubts.. I want to clarify that from the group members. The doubt is will there be a huge different between precision,recall and f-score. Because i computed precision to some 0.913 and recall goes very low like 0.3234 and f-score is about 0.4323 etc. Will it be possible?? I mean will precision and recall have this much huge difference or i calculated them wrongly.!! Please provide your suggestions as well your reference to some notes.. Thanks.. | precision | recall | null | null | null | null | open | Precision,Recall and F-score
===
I am working on a developing a new system which is based on information retrieval concept. My system retrieve's pdf and ppt files of research articles from the web. When i calculated precision,recall and f-score of the system, i had arrived at doubts.. I want to clarify that from the group members. The doubt is will there be a huge different between precision,recall and f-score. Because i computed precision to some 0.913 and recall goes very low like 0.3234 and f-score is about 0.4323 etc. Will it be possible?? I mean will precision and recall have this much huge difference or i calculated them wrongly.!! Please provide your suggestions as well your reference to some notes.. Thanks.. | 0 |
2,717,362 | 04/26/2010 22:26:37 | 142,463 | 07/22/2009 01:37:22 | 125 | 1 | XMPP Jabber Hosting | Looks like my shared hosting plan does not cover running a Jabber server. Does anyone know of any free or very cheap solutions for doing this?
Thanks! | xmpp | null | null | null | null | 04/27/2010 18:51:00 | off topic | XMPP Jabber Hosting
===
Looks like my shared hosting plan does not cover running a Jabber server. Does anyone know of any free or very cheap solutions for doing this?
Thanks! | 2 |
2,217,028 | 02/07/2010 14:19:35 | 139,265 | 07/16/2009 07:20:18 | 1 | 1 | SVN Import: "Error: Could not open the requested SVN filesystem" | I try to import my old project to new SVN server (svn + web_dav+apache), but however I get some weird error while importing with tortoiseSVN.
Adding: C:\tmp\carpirate\test
Adding: C:\tmp\carpirate\test\crawlerTestSuite
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestP2p.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestMessageHandler.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestGui.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestListener.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestServerConnection.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestCollectorMind.java
Error: Could not open the requested SVN filesystem
I checked read/write permissions from repository (tried to set all to 777), but nothing works. Neither commit do the job.
Do you have any clues, what I'm missing?
| svn | tortoisesvn | linux | apache | null | null | open | SVN Import: "Error: Could not open the requested SVN filesystem"
===
I try to import my old project to new SVN server (svn + web_dav+apache), but however I get some weird error while importing with tortoiseSVN.
Adding: C:\tmp\carpirate\test
Adding: C:\tmp\carpirate\test\crawlerTestSuite
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestP2p.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestMessageHandler.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestGui.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestListener.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestServerConnection.java
Adding: C:\tmp\carpirate\test\crawlerTestSuite\TestCollectorMind.java
Error: Could not open the requested SVN filesystem
I checked read/write permissions from repository (tried to set all to 777), but nothing works. Neither commit do the job.
Do you have any clues, what I'm missing?
| 0 |
3,979,044 | 10/20/2010 14:40:18 | 481,858 | 10/20/2010 14:40:18 | 1 | 0 | javax.ejb package not found (Eclipse) | I have installed Eclipse for Java EE and the Java EE SDK from Sun, and am attempting to create (my first) Java EE application.
I've created an EJB project, then added a session bean using Eclipse's own wizards, and the package javax.ejb isn't found!
I've configured the Java EE SDK as the target runtime environment, and a JDK 1.6 as the JRE.
What is going on!? Where does this package come from if not from the JEE SDK or Eclipse for Java EE developers!
Many thanks | eclipse | java-ee | ejb | null | null | null | open | javax.ejb package not found (Eclipse)
===
I have installed Eclipse for Java EE and the Java EE SDK from Sun, and am attempting to create (my first) Java EE application.
I've created an EJB project, then added a session bean using Eclipse's own wizards, and the package javax.ejb isn't found!
I've configured the Java EE SDK as the target runtime environment, and a JDK 1.6 as the JRE.
What is going on!? Where does this package come from if not from the JEE SDK or Eclipse for Java EE developers!
Many thanks | 0 |
9,432,987 | 02/24/2012 15:07:46 | 1,147,636 | 01/13/2012 12:00:07 | 1 | 0 | Write to file or write to database? | What is best in writing to a log file type or write directly into a database? in situations of high traffic. And especially what code is best for this task between php, perl and python?
Which consumption cpu, ram and hard drive I expect? | php | database | performance | perl | file | 02/24/2012 15:10:37 | not constructive | Write to file or write to database?
===
What is best in writing to a log file type or write directly into a database? in situations of high traffic. And especially what code is best for this task between php, perl and python?
Which consumption cpu, ram and hard drive I expect? | 4 |
6,016,822 | 05/16/2011 11:39:55 | 195,910 | 10/24/2009 15:57:49 | 91 | 6 | AWS Elastic Beanstalk vs Azure pricing | Anyone done a comparison between these from a price perspective? | azure | amazon-ec2 | beanstalk | null | null | 05/16/2011 12:33:22 | off topic | AWS Elastic Beanstalk vs Azure pricing
===
Anyone done a comparison between these from a price perspective? | 2 |
7,768,472 | 10/14/2011 13:39:01 | 85,661 | 04/01/2009 13:16:12 | 840 | 11 | Real asp.net memory leak or is visual studio to blame | I've been working on a small aspx website all week; this morning I noticed that my local instance was running extremely slowly. When checked in task manager, my webdev.WebServer40.exe process had a ~1.2GB working set. After restarting visual studio and running the site for about an hour afterwards the memory total is only about 100MB.
Is this an indication that serverside code is leaking memory somewhere, or is the webserver process just inefficient about cleaning up junk that accumulates over dozens of rebuilds? | asp.net | memory-leaks | null | null | null | 10/14/2011 13:52:20 | not constructive | Real asp.net memory leak or is visual studio to blame
===
I've been working on a small aspx website all week; this morning I noticed that my local instance was running extremely slowly. When checked in task manager, my webdev.WebServer40.exe process had a ~1.2GB working set. After restarting visual studio and running the site for about an hour afterwards the memory total is only about 100MB.
Is this an indication that serverside code is leaking memory somewhere, or is the webserver process just inefficient about cleaning up junk that accumulates over dozens of rebuilds? | 4 |
1,652,094 | 10/30/2009 20:24:07 | 93,422 | 04/20/2009 20:39:20 | 432 | 24 | .NET Component for Floor Plan Designer application | My next project is a kitchen designer application (CAD). Something like MS Visio or Home Suite app.
Front view is a must, view from the top and 3D are desired.
I want to be able to:
1. Drag'n'drop components on the floor plan.
1. Select and change size and color of the components.
1. Move components when dimensions of inner components change.
For now it is a desktop application (Windows Forms or WPF).
But would be nice to have an option for silverlight open. | .net | components | designer | null | null | 07/17/2012 18:01:15 | not constructive | .NET Component for Floor Plan Designer application
===
My next project is a kitchen designer application (CAD). Something like MS Visio or Home Suite app.
Front view is a must, view from the top and 3D are desired.
I want to be able to:
1. Drag'n'drop components on the floor plan.
1. Select and change size and color of the components.
1. Move components when dimensions of inner components change.
For now it is a desktop application (Windows Forms or WPF).
But would be nice to have an option for silverlight open. | 4 |
492,480 | 01/29/2009 16:56:51 | 425 | 08/05/2008 15:31:37 | 280 | 12 | What type of development do you find most interesting? | My past expereience has primarily been in the new media industry. My expereinces were that while this industry seemed to be laid back, most places have next to no management protocols. This inevatably leads to disorganized chaos,a lot of firefighting and lots of late nights.
I also find new media work to be mostly the same type of developments i.e. web based ECommerce/CMS/Marketing sites. Though I will admit that I have had *some* interesting projects in my time, though they were few and far between.
My current position is more line of business, internal application developments. In this type of industry I find I am dealing with more than enough protocols and procedures (red tape ahoy!). The disadvantages here are that Im working on large old projects that were written years ago, so bleeding edge it is not. Im also finding that of line-of-business application development seems to be split something along the lines of:
- 60% Mapping UI screens to CRUD operations.
- 15% Maintaining legacy systems
- 15% Business logic.
I wonder what your experiences are like, anyone working on:
- Framework developments,
- Or Maybe ELearning portals
- Games/3d Applciations
- Financial applcaitions
- CRM systems
Tell me your expereinces and what you guys find the most interesting type of development to get into. | career-development | language-agnostic | null | null | null | 02/05/2012 07:33:36 | not constructive | What type of development do you find most interesting?
===
My past expereience has primarily been in the new media industry. My expereinces were that while this industry seemed to be laid back, most places have next to no management protocols. This inevatably leads to disorganized chaos,a lot of firefighting and lots of late nights.
I also find new media work to be mostly the same type of developments i.e. web based ECommerce/CMS/Marketing sites. Though I will admit that I have had *some* interesting projects in my time, though they were few and far between.
My current position is more line of business, internal application developments. In this type of industry I find I am dealing with more than enough protocols and procedures (red tape ahoy!). The disadvantages here are that Im working on large old projects that were written years ago, so bleeding edge it is not. Im also finding that of line-of-business application development seems to be split something along the lines of:
- 60% Mapping UI screens to CRUD operations.
- 15% Maintaining legacy systems
- 15% Business logic.
I wonder what your experiences are like, anyone working on:
- Framework developments,
- Or Maybe ELearning portals
- Games/3d Applciations
- Financial applcaitions
- CRM systems
Tell me your expereinces and what you guys find the most interesting type of development to get into. | 4 |
5,843,079 | 04/30/2011 16:22:07 | 584,610 | 01/21/2011 15:05:55 | 44 | 0 | c# picturebox question | When I add an image into picturebox with C#,it does not come with actual size.
Thanks in advance. | c# | picturebox | null | null | null | 04/30/2011 16:31:46 | not a real question | c# picturebox question
===
When I add an image into picturebox with C#,it does not come with actual size.
Thanks in advance. | 1 |
10,252,930 | 04/20/2012 20:12:28 | 391,104 | 07/14/2010 01:45:37 | 4,220 | 3 | How do I install the latest gcc 4.7.0 on centos 6.2? | [root@localhost dyliu]# yum list gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.mirrors.tds.net
* extras: centos.mirrors.tds.net
* rpmforge: apt.sw.be
* updates: mirror.ubiquityservers.com
Installed Packages
gcc.i686 4.4.6-3.el6 @anaconda-CentOS-201112130233.i386/6.2
By default, if I run `yum install gcc`, the yum tool will install gcc 4.4.6 for me.
Question> How to install the latest gcc [4.7.0][1] on centos 6.2?
Thank you
[1]: http://gcc.gnu.org/ | linux | gcc | centos | null | null | 04/21/2012 18:38:45 | off topic | How do I install the latest gcc 4.7.0 on centos 6.2?
===
[root@localhost dyliu]# yum list gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.mirrors.tds.net
* extras: centos.mirrors.tds.net
* rpmforge: apt.sw.be
* updates: mirror.ubiquityservers.com
Installed Packages
gcc.i686 4.4.6-3.el6 @anaconda-CentOS-201112130233.i386/6.2
By default, if I run `yum install gcc`, the yum tool will install gcc 4.4.6 for me.
Question> How to install the latest gcc [4.7.0][1] on centos 6.2?
Thank you
[1]: http://gcc.gnu.org/ | 2 |
8,919,403 | 01/19/2012 00:10:45 | 454,671 | 09/17/2010 04:17:12 | 1,024 | 18 | WAS dumpNameSpace giving error | When I run the command : `/opt/IBM/Websphere/Appserver/bin/./dumpNameSpace.sh`
I get this error:
Getting the initial context
Getting the starting context
==============================================================================
Name Space Dump
Provider URL: corbaloc:iiop:localhost:2809
Context factory: com.ibm.websphere.naming.WsnInitialContextFactory
Requested root context: cell
Starting context: (top)=ctpCell
Formatting rules: jndi
Time of dump: Wed Jan 18 19:04:07 EST 2012
==============================================================================
==============================================================================
Beginning of Name Space Dump
==============================================================================
1 (top)
2 (top)/cell javax.naming.Context
2 Linked to context: ctpCell
3 (top)/legacyRoot javax.naming.Context
3 Linked to context: ctpCell/persistent
4 (top)/nodes javax.naming.Context
5 (top)/nodes/dmgrNode javax.naming.Context
6 (top)/nodes/dmgrNode/cell javax.naming.Context
6 Linked to context: ctpCell
7 (top)/nodes/dmgrNode/node javax.naming.Context
7 Linked to context: ctpCell/nodes/dmgrNode
8 (top)/nodes/dmgrNode/servers javax.naming.Context
9 (top)/nodes/dmgrNode/servers/dmgr javax.naming.Context
9 Linked to URL: corbaloc::hostName:9809/NameServiceServerRoot
10 (top)/nodes/dmgrNode/nodename java.lang.String
11 (top)/nodes/dmgrNode/domain javax.naming.Context
11 Linked to context: ctpCell
12 (top)/nodes/ssoNode1 javax.naming.Context
ERROR: Context "(top)/nodes/ssoNode1" will not be dumped.
Failure during listBindings() or hasMore() method.
Exception: javax.naming.PartialResultException: org.omg.CORBA.BAD_PARAM:
>> SERVER (id=11c328fe, host=hostName) TRACE START:
>> org.omg.CORBA.BAD_PARAM: Null Param (5) - any vmcid: IBM minor c ode: 205 completed: Maybe
>> at com.ibm.rmi.iiop.CDROutputStream.write_any(CDROutputStream.j ava:1150)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataHelper.write(DistB indingDataHelper.java:149)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataListHelper.write(D istBindingDataListHelper.java:59)
>> at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(_N amingContextImplBase.java:326)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(Serv erDelegate.java:627)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.ja va:480)
>> at com.ibm.rmi.iiop.ORB.process(ORB.java:512)
>> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
>> at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2719)
>> at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2584)
>> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
>> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
>> SERVER (id=11c328fe, host=olbbbccld3app21.tsa.bmo.com) TRACE END.
vmcid: IBM minor code: 205 completed: Maybe [Root exception is org.omg.CORBA. BAD_PARAM:
>> SERVER (id=11c328fe, host=hostName) TRACE START:
>> org.omg.CORBA.BAD_PARAM: Null Param (5) - any vmcid: IBM minor c ode: 205 completed: Maybe
>> at com.ibm.rmi.iiop.CDROutputStream.write_any(CDROutputStream.j ava:1150)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataHelper.write(DistB indingDataHelper.java:149)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataListHelper.write(D istBindingDataListHelper.java:59)
>> at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(_N amingContextImplBase.java:326)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(Serv erDelegate.java:627)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.ja va:480)
>> at com.ibm.rmi.iiop.ORB.process(ORB.java:512)
>> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
>> at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2719)
>> at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2584)
>> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
>> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
>> SERVER (id=11c328fe, host=hostName) TRACE END.
vmcid: IBM minor code: 205 completed: Maybe]
13 (top)/nodes/appNode1 javax.naming.Context
14 (top)/nodes/appNode1/nodename java.lang.String
15 (top)/nodes/appNode1/persistent javax.naming.Context
16 (top)/nodes/appNode1/cell javax.naming.Context
16 Linked to context: ctpCell
17 (top)/nodes/appNode1/nodeAgent javax.naming.Context
17 Linked to context: ctpCell/nodes/appNode1/servers/nodeagent
18 (top)/nodes/appNode1/node javax.naming.Context
18 Linked to context: ctpCell/nodes/appNode1
19 (top)/nodes/appNode1/servers javax.naming.Context
20 (top)/nodes/appNode1/servers/cuaServer1 javax.naming.Context
20 Linked to URL: corbaloc::olbbbccld3app21.tsa.bmo.com:9810/NameServiceServerRoot
21 (top)/nodes/appNode1/servers/reportServer1 javax.naming.Context
21 Linked to URL: corbaloc::hostName:9813/NameServiceServerRoot
22 (top)/nodes/appNode1/servers/batchServer1 javax.naming.Context
22 Linked to URL: corbaloc::hostName:9812/NameServiceServerRoot
23 (top)/nodes/appNode1/servers/nodeagent javax.naming.Context
24 (top)/nodes/appNode1/servers/nodeagent/servername java.lang.String
25 (top)/nodes/appNode1/servers/nodeagent/UserRegistry
25 com.ibm.websphere.security._UserRegistry_Stub
26 (top)/nodes/appNode1/servers/nodeagent/thisNode javax.naming.Context
26 Linked to context: ctpCell/nodes/appNode1
27 (top)/nodes/appNode1/servers/nodeagent/SecurityServer
27 com.ibm.ws.security.server._SecurityServer_Stub
28 (top)/nodes/appNode1/servers/nodeagent/cell javax.naming.Context
28 Linked to context: ctpCell
29 (top)/nodes/appNode1/domain javax.naming.Context
29 Linked to context: ctpCell
30 (top)/clusters javax.naming.Context
31 (top)/clusters/cuaCluster javax.naming.Context
31 Linked to URL: corbaloc::hostName:9810/NameServiceServerRoot
32 (top)/clusters/ssoCluster javax.naming.Context
32 Linked to URL: corbaloc::hostName:9811/NameServiceServerRoot
33 (top)/clusters/reportCluster javax.naming.Context
33 Linked to URL: corbaloc::hostName:9813/NameServiceServerRoot
34 (top)/clusters/batchCluster javax.naming.Context
34 Linked to URL: corbaloc::hostName:9812/NameServiceServerRoot
35 (top)/persistent javax.naming.Context
36 (top)/persistent/cell javax.naming.Context
36 Linked to context: ctpCell
37 (top)/cells javax.naming.Context
38 (top)/cellname java.lang.String
39 (top)/deploymentManager javax.naming.Context
39 Linked to URL: corbaloc::olbbbccld3app21:9809/NameServiceServerRoot
40 (top)/domain javax.naming.Context
40 Linked to context: ctpCell
==============================================================================
End of Name Space Dump
==============================================================================
How to solve this?
Also is there a way to see the JNDI tree from the admin console (as in weblogic)
| websphere-6.1 | null | null | null | null | null | open | WAS dumpNameSpace giving error
===
When I run the command : `/opt/IBM/Websphere/Appserver/bin/./dumpNameSpace.sh`
I get this error:
Getting the initial context
Getting the starting context
==============================================================================
Name Space Dump
Provider URL: corbaloc:iiop:localhost:2809
Context factory: com.ibm.websphere.naming.WsnInitialContextFactory
Requested root context: cell
Starting context: (top)=ctpCell
Formatting rules: jndi
Time of dump: Wed Jan 18 19:04:07 EST 2012
==============================================================================
==============================================================================
Beginning of Name Space Dump
==============================================================================
1 (top)
2 (top)/cell javax.naming.Context
2 Linked to context: ctpCell
3 (top)/legacyRoot javax.naming.Context
3 Linked to context: ctpCell/persistent
4 (top)/nodes javax.naming.Context
5 (top)/nodes/dmgrNode javax.naming.Context
6 (top)/nodes/dmgrNode/cell javax.naming.Context
6 Linked to context: ctpCell
7 (top)/nodes/dmgrNode/node javax.naming.Context
7 Linked to context: ctpCell/nodes/dmgrNode
8 (top)/nodes/dmgrNode/servers javax.naming.Context
9 (top)/nodes/dmgrNode/servers/dmgr javax.naming.Context
9 Linked to URL: corbaloc::hostName:9809/NameServiceServerRoot
10 (top)/nodes/dmgrNode/nodename java.lang.String
11 (top)/nodes/dmgrNode/domain javax.naming.Context
11 Linked to context: ctpCell
12 (top)/nodes/ssoNode1 javax.naming.Context
ERROR: Context "(top)/nodes/ssoNode1" will not be dumped.
Failure during listBindings() or hasMore() method.
Exception: javax.naming.PartialResultException: org.omg.CORBA.BAD_PARAM:
>> SERVER (id=11c328fe, host=hostName) TRACE START:
>> org.omg.CORBA.BAD_PARAM: Null Param (5) - any vmcid: IBM minor c ode: 205 completed: Maybe
>> at com.ibm.rmi.iiop.CDROutputStream.write_any(CDROutputStream.j ava:1150)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataHelper.write(DistB indingDataHelper.java:149)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataListHelper.write(D istBindingDataListHelper.java:59)
>> at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(_N amingContextImplBase.java:326)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(Serv erDelegate.java:627)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.ja va:480)
>> at com.ibm.rmi.iiop.ORB.process(ORB.java:512)
>> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
>> at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2719)
>> at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2584)
>> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
>> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
>> SERVER (id=11c328fe, host=olbbbccld3app21.tsa.bmo.com) TRACE END.
vmcid: IBM minor code: 205 completed: Maybe [Root exception is org.omg.CORBA. BAD_PARAM:
>> SERVER (id=11c328fe, host=hostName) TRACE START:
>> org.omg.CORBA.BAD_PARAM: Null Param (5) - any vmcid: IBM minor c ode: 205 completed: Maybe
>> at com.ibm.rmi.iiop.CDROutputStream.write_any(CDROutputStream.j ava:1150)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataHelper.write(DistB indingDataHelper.java:149)
>> at com.ibm.WsnOptimizedNaming.DistBindingDataListHelper.write(D istBindingDataListHelper.java:59)
>> at com.ibm.WsnOptimizedNaming._NamingContextImplBase._invoke(_N amingContextImplBase.java:326)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(Serv erDelegate.java:627)
>> at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.ja va:480)
>> at com.ibm.rmi.iiop.ORB.process(ORB.java:512)
>> at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
>> at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2719)
>> at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2584)
>> at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
>> at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
>> at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
>> SERVER (id=11c328fe, host=hostName) TRACE END.
vmcid: IBM minor code: 205 completed: Maybe]
13 (top)/nodes/appNode1 javax.naming.Context
14 (top)/nodes/appNode1/nodename java.lang.String
15 (top)/nodes/appNode1/persistent javax.naming.Context
16 (top)/nodes/appNode1/cell javax.naming.Context
16 Linked to context: ctpCell
17 (top)/nodes/appNode1/nodeAgent javax.naming.Context
17 Linked to context: ctpCell/nodes/appNode1/servers/nodeagent
18 (top)/nodes/appNode1/node javax.naming.Context
18 Linked to context: ctpCell/nodes/appNode1
19 (top)/nodes/appNode1/servers javax.naming.Context
20 (top)/nodes/appNode1/servers/cuaServer1 javax.naming.Context
20 Linked to URL: corbaloc::olbbbccld3app21.tsa.bmo.com:9810/NameServiceServerRoot
21 (top)/nodes/appNode1/servers/reportServer1 javax.naming.Context
21 Linked to URL: corbaloc::hostName:9813/NameServiceServerRoot
22 (top)/nodes/appNode1/servers/batchServer1 javax.naming.Context
22 Linked to URL: corbaloc::hostName:9812/NameServiceServerRoot
23 (top)/nodes/appNode1/servers/nodeagent javax.naming.Context
24 (top)/nodes/appNode1/servers/nodeagent/servername java.lang.String
25 (top)/nodes/appNode1/servers/nodeagent/UserRegistry
25 com.ibm.websphere.security._UserRegistry_Stub
26 (top)/nodes/appNode1/servers/nodeagent/thisNode javax.naming.Context
26 Linked to context: ctpCell/nodes/appNode1
27 (top)/nodes/appNode1/servers/nodeagent/SecurityServer
27 com.ibm.ws.security.server._SecurityServer_Stub
28 (top)/nodes/appNode1/servers/nodeagent/cell javax.naming.Context
28 Linked to context: ctpCell
29 (top)/nodes/appNode1/domain javax.naming.Context
29 Linked to context: ctpCell
30 (top)/clusters javax.naming.Context
31 (top)/clusters/cuaCluster javax.naming.Context
31 Linked to URL: corbaloc::hostName:9810/NameServiceServerRoot
32 (top)/clusters/ssoCluster javax.naming.Context
32 Linked to URL: corbaloc::hostName:9811/NameServiceServerRoot
33 (top)/clusters/reportCluster javax.naming.Context
33 Linked to URL: corbaloc::hostName:9813/NameServiceServerRoot
34 (top)/clusters/batchCluster javax.naming.Context
34 Linked to URL: corbaloc::hostName:9812/NameServiceServerRoot
35 (top)/persistent javax.naming.Context
36 (top)/persistent/cell javax.naming.Context
36 Linked to context: ctpCell
37 (top)/cells javax.naming.Context
38 (top)/cellname java.lang.String
39 (top)/deploymentManager javax.naming.Context
39 Linked to URL: corbaloc::olbbbccld3app21:9809/NameServiceServerRoot
40 (top)/domain javax.naming.Context
40 Linked to context: ctpCell
==============================================================================
End of Name Space Dump
==============================================================================
How to solve this?
Also is there a way to see the JNDI tree from the admin console (as in weblogic)
| 0 |
6,554,839 | 07/02/2011 02:56:55 | 800,616 | 06/16/2011 00:37:49 | 6 | 0 | Do anyone know how to sort stack using array.sort()? I just want to print the ordered list of points by their x coordinates. Any idea? | import java.util.*;
public class Point2D
{
private double x;
private double y;
public Point2D(double x, double y)
{
this.x = x;
this.y = y;
}
private double Euclidean()
{
double Distance = Math.sqrt((x * x) + (y * y));
return Distance;
}
public String toString()
{
return "x: " + x + ", y: " + y;
}
public static class YOrder implements Comparator<Point2D>
{
public int compare(Point2D self, Point2D other)
{
if (self.y > other.y)
return 1;
if (self.y < other.y)
return -1;
else
return 0;
}
}
public static void main(String[] args)
{
Stack<Point2D> stack = new Stack<Point2D>();
while (!StdIn.isEmpty())
{
double x = StdIn.readDouble();
double y = StdIn.readDouble();
stack.push(new Point2D(x,y));
}
Arrays.sort(stack);
}
} | java | null | null | null | null | null | open | Do anyone know how to sort stack using array.sort()? I just want to print the ordered list of points by their x coordinates. Any idea?
===
import java.util.*;
public class Point2D
{
private double x;
private double y;
public Point2D(double x, double y)
{
this.x = x;
this.y = y;
}
private double Euclidean()
{
double Distance = Math.sqrt((x * x) + (y * y));
return Distance;
}
public String toString()
{
return "x: " + x + ", y: " + y;
}
public static class YOrder implements Comparator<Point2D>
{
public int compare(Point2D self, Point2D other)
{
if (self.y > other.y)
return 1;
if (self.y < other.y)
return -1;
else
return 0;
}
}
public static void main(String[] args)
{
Stack<Point2D> stack = new Stack<Point2D>();
while (!StdIn.isEmpty())
{
double x = StdIn.readDouble();
double y = StdIn.readDouble();
stack.push(new Point2D(x,y));
}
Arrays.sort(stack);
}
} | 0 |
8,673,218 | 12/29/2011 20:45:05 | 745,855 | 05/09/2011 21:35:01 | 104 | 1 | Object move along the path | A question may seem a little vague, but I have no idea how making this in Objective-C.
In your opinion, how can I move an object along a straight line or curve? Let's say that when I press a button, UIImageView must move along the path. which way should I take?
Thanks to all | objective-c | xcode | null | null | null | null | open | Object move along the path
===
A question may seem a little vague, but I have no idea how making this in Objective-C.
In your opinion, how can I move an object along a straight line or curve? Let's say that when I press a button, UIImageView must move along the path. which way should I take?
Thanks to all | 0 |
3,271,524 | 07/17/2010 12:44:14 | 146,860 | 07/29/2009 06:21:52 | 6 | 1 | Array of undefinite length.. | how to find a random element in a sorted array of unknown length. | arrays | data-structures | binary-search | null | null | 07/18/2010 08:51:19 | not a real question | Array of undefinite length..
===
how to find a random element in a sorted array of unknown length. | 1 |
10,045,587 | 04/06/2012 15:27:13 | 1,305,205 | 03/31/2012 15:45:11 | 7 | 0 | Which one is better jquery mobile or phonegap | Hi guys i am going to make a android game. i wanna know that which one is better for beginner on android like me. i know js. kindly suggest me that which one i have to use **phonegap** or **jquery mobile**?
Regards | android | jquery-mobile | phonegap | null | null | 04/10/2012 20:16:18 | not constructive | Which one is better jquery mobile or phonegap
===
Hi guys i am going to make a android game. i wanna know that which one is better for beginner on android like me. i know js. kindly suggest me that which one i have to use **phonegap** or **jquery mobile**?
Regards | 4 |
665,566 | 03/20/2009 10:10:19 | 58,737 | 01/25/2009 06:13:00 | 273 | 16 | Python Tkinter Shell to GUI ? | I have created a program that prints results on command line.
Now, I want to see the same result to GUI .
**How can I redirect command line results to GUI?** | python | tkinter | gui | null | null | null | open | Python Tkinter Shell to GUI ?
===
I have created a program that prints results on command line.
Now, I want to see the same result to GUI .
**How can I redirect command line results to GUI?** | 0 |
3,054,889 | 06/16/2010 15:44:59 | 368,419 | 06/16/2010 15:44:59 | 1 | 0 | Can someone tell me breifly how sharepoint works?! | I have been trying to find a simple answer for a while now but I can't seem to get a direct answer?! Can someone please put it into simple terms? Thanks it would be much appreciated | asp.net | sql | sharepoint | iis | microsoft | 06/16/2010 15:54:53 | not a real question | Can someone tell me breifly how sharepoint works?!
===
I have been trying to find a simple answer for a while now but I can't seem to get a direct answer?! Can someone please put it into simple terms? Thanks it would be much appreciated | 1 |
4,814,529 | 01/27/2011 09:20:31 | 7,850 | 09/15/2008 14:32:35 | 2,002 | 65 | How to have "service" pages in ASP.NET MVC? | MVC newbie here:
I've more or less worked out the page navigation aspect of MVC. But let's say I don't want to navigate to a View, but rather I want to get a response out of the web site, e.g. by sending a request to http://mysite.com/Services/GetFoo/123 I want to make a database request to select a `Foo` object with ID 123 and return it serialized as XML.
How do you do that? | c# | asp.net-mvc | visual-studio-2010 | mvc | null | null | open | How to have "service" pages in ASP.NET MVC?
===
MVC newbie here:
I've more or less worked out the page navigation aspect of MVC. But let's say I don't want to navigate to a View, but rather I want to get a response out of the web site, e.g. by sending a request to http://mysite.com/Services/GetFoo/123 I want to make a database request to select a `Foo` object with ID 123 and return it serialized as XML.
How do you do that? | 0 |
7,547,299 | 09/25/2011 17:37:46 | 963,831 | 09/25/2011 16:42:56 | 1 | 0 | Returning an OFFSET subquery result in sqlite3 | I'm selecting a random row from a table in SQLite by using a subquery to determine a random OFFSET value:
SELECT id, prev_node, next_node FROM edges WHERE prev_node = ? LIMIT 1
OFFSET abs(random())%(SELECT count(*) FROM edges WHERE prev_node = ?);
This is functionally correct for my task, but it requires two hits to an index:
0|0|TABLE edges WITH INDEX edges_all_prev
0|0|TABLE edges WITH INDEX edges_all_prev
The query is for a random walk that is very likely to visit the same node more than once, so as the number of edges grows it would be helpful to cache the result of the `SELECT count(*)` subquery.
Can I select the value of that subquery along with my other returned values?
Looking at the VDBE dump for the query, that value is just out of reach. It's in register **8** (moved there in step 21) while the result row is being created from registers **16-18** (step 42):
0|Trace|0|0|0||00|
1|Integer|1|1|0||00|
2|Function|0|0|5|random(0)|00|
3|Function|0|5|4|abs(1)|01|
4|If|7|23|0||00|
5|Integer|1|7|0||00|
6|Null|0|8|0||00|
7|Integer|1|9|0||00|
8|Null|0|10|0||00|
9|Variable|2|11|1||00|
10|Goto|0|47|0||00|
11|OpenRead|2|15|0|keyinfo(4,BINARY,BINARY)|00|
12|IsNull|11|18|0||00|
13|Affinity|11|1|0|d|00|
14|SeekGe|2|18|11|1|00|
15|IdxGE|2|18|11|1|01|
16|AggStep|0|0|10|count(0)|00|
17|Next|2|15|0||00|
18|Close|2|0|0||00|
19|AggFinal|10|0|0|count(0)|00|
20|SCopy|10|13|0||00|
21|Move|13|8|1||00|
22|IfZero|9|23|-1||00|
23|Remainder|8|4|2||00|
24|MustBeInt|2|0|0||00|
25|IfPos|2|27|0||00|
26|Integer|0|2|0||00|
33|Affinity|14|1|0|d|00|
34|SeekGe|3|45|14|1|00|
35|IdxGE|3|45|14|1|01|
36|AddImm|2|-1|0||00|
37|IfNeg|2|39|0||00|
38|Goto|0|44|0||00|
39|IdxRowid|3|16|0||00|
40|Column|3|0|17||00|
41|Column|3|1|18||00|
42|ResultRow|16|3|0||00|
43|IfZero|1|45|-1||00|
44|Next|3|35|0||00|
45|Close|3|0|0||00|
46|Halt|0|0|0||00|
47|Transaction|0|0|0||00|
48|VerifyCookie|0|27|0||00|
49|TableLock|0|9|0|edges|00|
50|Goto|0|11|0||00|
I could create a function that saves the count after it's calculated, but is there a straightforward SQL syntax for requesting the result of that subquery? | sqlite | subquery | offset | null | null | null | open | Returning an OFFSET subquery result in sqlite3
===
I'm selecting a random row from a table in SQLite by using a subquery to determine a random OFFSET value:
SELECT id, prev_node, next_node FROM edges WHERE prev_node = ? LIMIT 1
OFFSET abs(random())%(SELECT count(*) FROM edges WHERE prev_node = ?);
This is functionally correct for my task, but it requires two hits to an index:
0|0|TABLE edges WITH INDEX edges_all_prev
0|0|TABLE edges WITH INDEX edges_all_prev
The query is for a random walk that is very likely to visit the same node more than once, so as the number of edges grows it would be helpful to cache the result of the `SELECT count(*)` subquery.
Can I select the value of that subquery along with my other returned values?
Looking at the VDBE dump for the query, that value is just out of reach. It's in register **8** (moved there in step 21) while the result row is being created from registers **16-18** (step 42):
0|Trace|0|0|0||00|
1|Integer|1|1|0||00|
2|Function|0|0|5|random(0)|00|
3|Function|0|5|4|abs(1)|01|
4|If|7|23|0||00|
5|Integer|1|7|0||00|
6|Null|0|8|0||00|
7|Integer|1|9|0||00|
8|Null|0|10|0||00|
9|Variable|2|11|1||00|
10|Goto|0|47|0||00|
11|OpenRead|2|15|0|keyinfo(4,BINARY,BINARY)|00|
12|IsNull|11|18|0||00|
13|Affinity|11|1|0|d|00|
14|SeekGe|2|18|11|1|00|
15|IdxGE|2|18|11|1|01|
16|AggStep|0|0|10|count(0)|00|
17|Next|2|15|0||00|
18|Close|2|0|0||00|
19|AggFinal|10|0|0|count(0)|00|
20|SCopy|10|13|0||00|
21|Move|13|8|1||00|
22|IfZero|9|23|-1||00|
23|Remainder|8|4|2||00|
24|MustBeInt|2|0|0||00|
25|IfPos|2|27|0||00|
26|Integer|0|2|0||00|
33|Affinity|14|1|0|d|00|
34|SeekGe|3|45|14|1|00|
35|IdxGE|3|45|14|1|01|
36|AddImm|2|-1|0||00|
37|IfNeg|2|39|0||00|
38|Goto|0|44|0||00|
39|IdxRowid|3|16|0||00|
40|Column|3|0|17||00|
41|Column|3|1|18||00|
42|ResultRow|16|3|0||00|
43|IfZero|1|45|-1||00|
44|Next|3|35|0||00|
45|Close|3|0|0||00|
46|Halt|0|0|0||00|
47|Transaction|0|0|0||00|
48|VerifyCookie|0|27|0||00|
49|TableLock|0|9|0|edges|00|
50|Goto|0|11|0||00|
I could create a function that saves the count after it's calculated, but is there a straightforward SQL syntax for requesting the result of that subquery? | 0 |
4,877,632 | 02/02/2011 17:24:02 | 492,766 | 10/31/2010 13:21:43 | 22 | 0 | Create all permutations of a string incrementally c# | I am trying to create a function that will create all permutations of a string in an incremental fashion. I would like to start at:
AAAAA
...
AAAAB
...
ACCCC
...
...
ZZZZZ
I have looked around, and can't seem to find anything of that sort. I tried to create it, but it wasn't incrementally.
Any suggestions? | c# | string | permutation | null | null | null | open | Create all permutations of a string incrementally c#
===
I am trying to create a function that will create all permutations of a string in an incremental fashion. I would like to start at:
AAAAA
...
AAAAB
...
ACCCC
...
...
ZZZZZ
I have looked around, and can't seem to find anything of that sort. I tried to create it, but it wasn't incrementally.
Any suggestions? | 0 |
8,774,309 | 01/08/2012 00:18:24 | 1,102,893 | 12/16/2011 23:48:07 | 1 | 0 | Youtube videos are coming over footer in the chrome but working fine in Mozilla | I have a site inspire.mobi showing videos from youtube & vimeo. The problem is for youtube videos as these are coming over the footer in chrome but it is working fine in chrome.
Please help on it. | wordpress | google-chrome | youtube | null | null | 02/09/2012 18:42:39 | not a real question | Youtube videos are coming over footer in the chrome but working fine in Mozilla
===
I have a site inspire.mobi showing videos from youtube & vimeo. The problem is for youtube videos as these are coming over the footer in chrome but it is working fine in chrome.
Please help on it. | 1 |
10,987,973 | 06/11/2012 21:44:43 | 1,413,067 | 05/23/2012 15:48:20 | 1 | 0 | thrust::reduce_by_key on tuple zip_iterator | I've two vectors, and after creating a tuple (with zip_iterator) I would order them with sort_by_key and then apply reduce_by_key.
But the reduce doesn't work well.... and it creates a vector counter incorrect! May you help me?
I write down the code.
...
typedef thrust::device_vector<int>::iterator IntIterator;
typedef thrust::tuple<IntIterator, IntIterator> IteratorTuple;
typedef thrust::zip_iterator<IteratorTuple> ZipIterator;
typedef thrust::tuple<int, int> tupla;
...
thrust::device_vector <int> documenti(n);
thrust::device_vector <int> strip(n);
...
ZipIterator bufferBegin (thrust::make_tuple(documenti.begin(),strip.begin()));
ZipIterator bufferEnd (thrust::make_tuple(documenti.end(),strip.end()));
...
thrust::sort_by_key(bufferBegin,bufferEnd, counter.begin());
thrust::device_vector <tupla> example(n);
thrust::reduce_by_key(bufferBegin,bufferEnd, counter.begin(), example.begin(), counter.begin());
thrust::sort_by_key(counter.begin(), counter.begin()+n, example.begin(),thrust::greater <int>()); | thrust | null | null | null | null | null | open | thrust::reduce_by_key on tuple zip_iterator
===
I've two vectors, and after creating a tuple (with zip_iterator) I would order them with sort_by_key and then apply reduce_by_key.
But the reduce doesn't work well.... and it creates a vector counter incorrect! May you help me?
I write down the code.
...
typedef thrust::device_vector<int>::iterator IntIterator;
typedef thrust::tuple<IntIterator, IntIterator> IteratorTuple;
typedef thrust::zip_iterator<IteratorTuple> ZipIterator;
typedef thrust::tuple<int, int> tupla;
...
thrust::device_vector <int> documenti(n);
thrust::device_vector <int> strip(n);
...
ZipIterator bufferBegin (thrust::make_tuple(documenti.begin(),strip.begin()));
ZipIterator bufferEnd (thrust::make_tuple(documenti.end(),strip.end()));
...
thrust::sort_by_key(bufferBegin,bufferEnd, counter.begin());
thrust::device_vector <tupla> example(n);
thrust::reduce_by_key(bufferBegin,bufferEnd, counter.begin(), example.begin(), counter.begin());
thrust::sort_by_key(counter.begin(), counter.begin()+n, example.begin(),thrust::greater <int>()); | 0 |
6,419,759 | 06/21/2011 02:36:30 | 308,962 | 04/05/2010 02:53:19 | 158 | 5 | Which is faster? ORDER BY Timestamp or WHERE Timestamp = | I'm setting up a sqlite database that will monitor a number of physical sensors. A separate application is saving data for several months... This application will just monitor that data acquisition. I want to make sure my query is as efficient as possible.
I would like to pull the last few readings from the sensors. There will be about 20 different types of sensors, each with a different sensor ID.
This is just for monitoring purposes, so it doesn't have to precisely capture all the data, just display recent values.
Which of these would be faster? why?
sqlCommString = "SELECT * FROM Samples WHERE Timestamp = '" + DateTime10SecondsAgo + "'
sqlCommString = "SELECT * FROM Samples ORDER BY Timestamp DESC LIMIT 20"
| vb.net | sqlite | null | null | null | null | open | Which is faster? ORDER BY Timestamp or WHERE Timestamp =
===
I'm setting up a sqlite database that will monitor a number of physical sensors. A separate application is saving data for several months... This application will just monitor that data acquisition. I want to make sure my query is as efficient as possible.
I would like to pull the last few readings from the sensors. There will be about 20 different types of sensors, each with a different sensor ID.
This is just for monitoring purposes, so it doesn't have to precisely capture all the data, just display recent values.
Which of these would be faster? why?
sqlCommString = "SELECT * FROM Samples WHERE Timestamp = '" + DateTime10SecondsAgo + "'
sqlCommString = "SELECT * FROM Samples ORDER BY Timestamp DESC LIMIT 20"
| 0 |
3,995,489 | 10/22/2010 09:25:39 | 337,062 | 05/10/2010 07:37:14 | 59 | 13 | Why jquery datapicker inconsistently shows up? | Here is my problem. It seems that datapicker does not show up when clicked the first time on the dynamically added input (I have to click two or more times on it or best if I click above the input (label area)), does anyone see the problem. I tried a lot of live(), bind() .hasDatapicker and #datep1 variants. If possible test your answer first. Thanks.
script side:
<script>
$(document).ready(function(){
var div_data='<div id="div_data" class="data"><br />'+
'Dates from: <input type="text" id="datep1" size="10" name="data1">'+
' to: <input type="text" id="datep2" size="10" name="data2"> (Optional fields)</div>';
$("#rod_sem").after(div_data);
$(".br1").remove();
$(":input[name='pasirink']").click(function(){
var currentId = $(this).attr("id");
if (currentId == 'rod_sem')
{
$(".br1").remove();
$(".data").remove(); // this is done to prevent repetitive additions
$("#rod_sem").after(div_data); // here comes datepicker input
$("#datep1").live("click", function() {
$("#datep1").datepicker();
})
}
})
})
</script>
Html:
<label id="la_rod_sem" for="rod_sem">Seminars</label>
<input type="radio" name="pasirink" id="rod_sem" value="rod_sem" checked="checked" />
<br class="br1" />
<br class="br1" />
<label id="la_rod_klaus" for="rod_klaus">Attendees</label>
<input type="radio" name="pasirink" id="rod_klaus" value="rod_klaus" />
<br />
<br />
| jquery | datepicker | null | null | null | null | open | Why jquery datapicker inconsistently shows up?
===
Here is my problem. It seems that datapicker does not show up when clicked the first time on the dynamically added input (I have to click two or more times on it or best if I click above the input (label area)), does anyone see the problem. I tried a lot of live(), bind() .hasDatapicker and #datep1 variants. If possible test your answer first. Thanks.
script side:
<script>
$(document).ready(function(){
var div_data='<div id="div_data" class="data"><br />'+
'Dates from: <input type="text" id="datep1" size="10" name="data1">'+
' to: <input type="text" id="datep2" size="10" name="data2"> (Optional fields)</div>';
$("#rod_sem").after(div_data);
$(".br1").remove();
$(":input[name='pasirink']").click(function(){
var currentId = $(this).attr("id");
if (currentId == 'rod_sem')
{
$(".br1").remove();
$(".data").remove(); // this is done to prevent repetitive additions
$("#rod_sem").after(div_data); // here comes datepicker input
$("#datep1").live("click", function() {
$("#datep1").datepicker();
})
}
})
})
</script>
Html:
<label id="la_rod_sem" for="rod_sem">Seminars</label>
<input type="radio" name="pasirink" id="rod_sem" value="rod_sem" checked="checked" />
<br class="br1" />
<br class="br1" />
<label id="la_rod_klaus" for="rod_klaus">Attendees</label>
<input type="radio" name="pasirink" id="rod_klaus" value="rod_klaus" />
<br />
<br />
| 0 |
11,607,423 | 07/23/2012 06:27:54 | 1,530,983 | 07/17/2012 07:26:27 | 3 | 0 | Listing all the files from a directory and their paths into separate strings (java) | So I've made many searches on this topic, but nothing seems to work. All the answers I've found are just partial, just code snippets and "just import this". I would like it if somebody could tell me the best package to use for this and the syntax for it. I'd like to be able to use this information in future situations.
Thanks in advance! | java | null | null | null | null | 07/23/2012 08:33:18 | not a real question | Listing all the files from a directory and their paths into separate strings (java)
===
So I've made many searches on this topic, but nothing seems to work. All the answers I've found are just partial, just code snippets and "just import this". I would like it if somebody could tell me the best package to use for this and the syntax for it. I'd like to be able to use this information in future situations.
Thanks in advance! | 1 |
3,655,474 | 09/07/2010 03:05:10 | 372,724 | 06/22/2010 02:19:11 | 178 | 9 | SSAS interview questions | For a entry level programer in SSAS having an experience of just 1 month, what can be the
interview question so far SSAS is concern?
Thanks | ssas | null | null | null | null | 11/29/2011 02:42:23 | not constructive | SSAS interview questions
===
For a entry level programer in SSAS having an experience of just 1 month, what can be the
interview question so far SSAS is concern?
Thanks | 4 |
10,136,982 | 04/13/2012 07:42:40 | 1,330,962 | 04/13/2012 07:25:44 | 1 | 0 | Which is the best PHP IDE in-terms of Tracking the Code? | I am working as a php developer, I have the existing php project with me, But I am not able to understand & track the code, I don't have any help to understand the flow of the project, So i believe stackoverflow.com will help me to solve my problem,
Please tell,
Which is the best PHP IDE?
- In-terms of Tracking the code
- Understanding the Flow when i Run
- function descriptions and auto completion
- Debugging the Code (step by step)
| php | ide | php-ide | null | null | 04/13/2012 10:43:33 | not constructive | Which is the best PHP IDE in-terms of Tracking the Code?
===
I am working as a php developer, I have the existing php project with me, But I am not able to understand & track the code, I don't have any help to understand the flow of the project, So i believe stackoverflow.com will help me to solve my problem,
Please tell,
Which is the best PHP IDE?
- In-terms of Tracking the code
- Understanding the Flow when i Run
- function descriptions and auto completion
- Debugging the Code (step by step)
| 4 |
8,367,644 | 12/03/2011 12:29:39 | 126,280 | 10/30/2008 23:45:13 | 459 | 0 | VNC Sever possible in iOS? | I am looking to control my iPhone from my OSX machine. I assumed there would already be a VNC server application for the iPhone in the App Store.
Before I go ahead and try and create one myself, is there a reason why it hasn't been done already - is it not possible - if so why is it not possible?
Thanks. | ios | vnc-server | null | null | null | 12/04/2011 22:55:49 | off topic | VNC Sever possible in iOS?
===
I am looking to control my iPhone from my OSX machine. I assumed there would already be a VNC server application for the iPhone in the App Store.
Before I go ahead and try and create one myself, is there a reason why it hasn't been done already - is it not possible - if so why is it not possible?
Thanks. | 2 |
4,763,962 | 01/21/2011 21:27:15 | 585,027 | 01/21/2011 20:33:52 | 1 | 0 | beginner Programmer needs help | Would any be willing to take a look at my project and help me out? Anyone with some knowledge of C# will not have any problem with this or take more than a few mintues to figure out. I just can't seem to grasp what my school project is trying to accomplish.
Would anyone be willing to take a little time to help me out, where I could explain my project in depth. I have everything built, I just need to code the events for my form. My teacher is a dud and is no help. | c# | visual-studio-2008 | null | null | null | 01/21/2011 21:29:56 | not a real question | beginner Programmer needs help
===
Would any be willing to take a look at my project and help me out? Anyone with some knowledge of C# will not have any problem with this or take more than a few mintues to figure out. I just can't seem to grasp what my school project is trying to accomplish.
Would anyone be willing to take a little time to help me out, where I could explain my project in depth. I have everything built, I just need to code the events for my form. My teacher is a dud and is no help. | 1 |
1,071,542 | 07/01/2009 21:47:01 | 121,201 | 06/11/2009 09:43:19 | 1 | 0 | In C - check if a char exists in a char array | I'm trying to check if a character belongs to a list/array of invalid characters.
Coming from a Python background, I used to be able to just say:
for c in string:
if c in invalid_characters:
#do stuff, etc
How can I do this with regular C char arrays? | c | char | arrays | string | null | null | open | In C - check if a char exists in a char array
===
I'm trying to check if a character belongs to a list/array of invalid characters.
Coming from a Python background, I used to be able to just say:
for c in string:
if c in invalid_characters:
#do stuff, etc
How can I do this with regular C char arrays? | 0 |
10,126,732 | 04/12/2012 15:25:47 | 396,383 | 07/20/2010 02:13:46 | 1,498 | 3 | Is it possible to construct a wstring without coping its input buffer? | There are many object of std::wstring created in my program as,
std::wstring mystr(L"test string");
As the input wchar string is string constant, it would save some heap usage if mystr is constructed as mystr.c_str() equals to the address of L"test string". Is it possible to construct such wstring? | c++ | null | null | null | null | null | open | Is it possible to construct a wstring without coping its input buffer?
===
There are many object of std::wstring created in my program as,
std::wstring mystr(L"test string");
As the input wchar string is string constant, it would save some heap usage if mystr is constructed as mystr.c_str() equals to the address of L"test string". Is it possible to construct such wstring? | 0 |
5,916,181 | 05/06/2011 19:33:42 | 146,100 | 07/28/2009 01:40:16 | 432 | 3 | Is there any way to get the android screen darker (less bright) than the lowest config setting ? | Is there any way to get the android screen darker than how it gets with the lowest configuration setting?
I need it as dark as possible so that it doesn't bother people when sleeping, but without tuning it off (because I need to stay responsive to the touch).
Isn't there a way to make it darker than the lowest brightness setting, but maintain the touch sensitivity by not turning it on ?
Thanks, | android | null | null | null | null | 05/27/2011 14:59:27 | off topic | Is there any way to get the android screen darker (less bright) than the lowest config setting ?
===
Is there any way to get the android screen darker than how it gets with the lowest configuration setting?
I need it as dark as possible so that it doesn't bother people when sleeping, but without tuning it off (because I need to stay responsive to the touch).
Isn't there a way to make it darker than the lowest brightness setting, but maintain the touch sensitivity by not turning it on ?
Thanks, | 2 |
3,605,263 | 08/31/2010 00:42:52 | 341,750 | 10/18/2009 08:41:13 | 882 | 111 | How many programming languages should a competent programmer know? | If you were hiring a programmer, or evaluating potential team members for your software project, would you expect them to know any programming languages besides the one required for the project? If so how many programming languages, how different from the one chosen for the project at hand, how well, and why?
| programming-languages | null | null | null | null | 08/31/2010 00:47:50 | not constructive | How many programming languages should a competent programmer know?
===
If you were hiring a programmer, or evaluating potential team members for your software project, would you expect them to know any programming languages besides the one required for the project? If so how many programming languages, how different from the one chosen for the project at hand, how well, and why?
| 4 |
10,571,927 | 05/13/2012 12:59:26 | 494,143 | 11/01/2010 23:01:19 | 2,488 | 63 | Finalize method guidelines and best practices in C# | I have recently encountered an issue that is related to code running in the Finalize method overload.
I am mostly aware of issues that are related to memory management/performance, but i am interested whether there are any guidelines for "which code should/shouldn't go in a Finalize method" ?
For example:
1. Do not throw exceptions from within a Finalize method.
2. Code should execute quickly.
3. Do not raise events (?)
4. Etc...
The behaviour in my case was seen due to an event being raised that caused some exception.
So my question is -- what guidelines must i follow (perhaps even enforce using some tools) regarding finalize methods?
| c# | .net | design | coding-style | finalize | null | open | Finalize method guidelines and best practices in C#
===
I have recently encountered an issue that is related to code running in the Finalize method overload.
I am mostly aware of issues that are related to memory management/performance, but i am interested whether there are any guidelines for "which code should/shouldn't go in a Finalize method" ?
For example:
1. Do not throw exceptions from within a Finalize method.
2. Code should execute quickly.
3. Do not raise events (?)
4. Etc...
The behaviour in my case was seen due to an event being raised that caused some exception.
So my question is -- what guidelines must i follow (perhaps even enforce using some tools) regarding finalize methods?
| 0 |
8,220,820 | 11/22/2011 01:17:55 | 399,584 | 07/22/2010 20:19:56 | 606 | 41 | Dual booting vs. virtual machines | I do most of my current work in Windows 7, but I also do a fair amount of PHP, and would like to get into RoR development. To that end, I need to have access to a Linux environment, but I'm not quite sure how to go about it.
I'm somewhat comfortable with a dual boot setup, as I successfully configured my old machine as a Windows 7/Linux Mint machine. I just can't help but wonder if that's the way to go when free tools like VirtualBox exist.
I've never setup a virtual environment, but it seems like a skill I should learn.
I understand that both have advantages - dual booting allows me to run another OS right on the hardware, while using virtual machines allows me to easily load and use other OSes, either on my HDD directly, or from external media.
Is there anything else I should consider? I'm not expecting to need more than one Linux environment in addition to my current Windows environment. | linux | windows-7 | null | null | null | 11/22/2011 02:12:54 | off topic | Dual booting vs. virtual machines
===
I do most of my current work in Windows 7, but I also do a fair amount of PHP, and would like to get into RoR development. To that end, I need to have access to a Linux environment, but I'm not quite sure how to go about it.
I'm somewhat comfortable with a dual boot setup, as I successfully configured my old machine as a Windows 7/Linux Mint machine. I just can't help but wonder if that's the way to go when free tools like VirtualBox exist.
I've never setup a virtual environment, but it seems like a skill I should learn.
I understand that both have advantages - dual booting allows me to run another OS right on the hardware, while using virtual machines allows me to easily load and use other OSes, either on my HDD directly, or from external media.
Is there anything else I should consider? I'm not expecting to need more than one Linux environment in addition to my current Windows environment. | 2 |
4,178,513 | 11/14/2010 16:50:55 | 260,594 | 01/28/2010 02:29:49 | 1,344 | 6 | Multi line variable not getting created. | Can anybody tell what is the problem with this following code?
class EMAIL_BODY{
public $REGISTRATION = <<<EOF
<html>
<head>
</head>
<body style='font-family: helvetica;'>
Welcome <b>#{FIRST}</b>, <br/> You have successfully created your account.
However, there is one more step that you need to take to verify your account.
Please click the below given link to activate your account.
Unless you do that your account won\'t get activated. <br/>
<a> #{LINK} </a>
</body>
</html>
EOF;
}
Thanks in advance :) | php | null | null | null | null | null | open | Multi line variable not getting created.
===
Can anybody tell what is the problem with this following code?
class EMAIL_BODY{
public $REGISTRATION = <<<EOF
<html>
<head>
</head>
<body style='font-family: helvetica;'>
Welcome <b>#{FIRST}</b>, <br/> You have successfully created your account.
However, there is one more step that you need to take to verify your account.
Please click the below given link to activate your account.
Unless you do that your account won\'t get activated. <br/>
<a> #{LINK} </a>
</body>
</html>
EOF;
}
Thanks in advance :) | 0 |
4,621,478 | 01/07/2011 00:34:41 | 465,408 | 10/03/2010 22:02:13 | 123 | 7 | What is the best Windows Installer? | What is the best Windows installer maker.
I want to buy one.
Price doesn't matter.
There are some few years old questions, but we have 2011 now. | c# | .net | installer | installation | windows-installer | 07/21/2012 04:05:22 | not constructive | What is the best Windows Installer?
===
What is the best Windows installer maker.
I want to buy one.
Price doesn't matter.
There are some few years old questions, but we have 2011 now. | 4 |
11,168,534 | 06/23/2012 09:53:19 | 1,476,625 | 06/23/2012 09:43:09 | 1 | 0 | How to adjust the application with equal resolution in different browsers? | I am developing an application with html and css technologies.. I am not getting correct output when i view the application in different browser. So, please anyone can tell me how to adjust the application with equal resolution in different browsers.... | html | css | null | null | null | 06/25/2012 03:31:33 | not a real question | How to adjust the application with equal resolution in different browsers?
===
I am developing an application with html and css technologies.. I am not getting correct output when i view the application in different browser. So, please anyone can tell me how to adjust the application with equal resolution in different browsers.... | 1 |
1,624,725 | 10/26/2009 13:17:16 | 191,758 | 10/17/2009 18:07:50 | 3 | 0 | Is it ok to learn computer science/programming concepts on your own outside of those being learned in class? | I realize that the answer to this question might seem obvious at first(who wouldn't recommend learning more?), however what I am asking is whether it is a good idea to learn concepts on your own when there is a high possibility you will cover it in class in the future. I am specifically referring to concepts covered in classes that are a part of a computer science major.
What should I learn in my spare time which will not conflict with what I will be learning in class? I understand this is a broad question, but any suggestions would be appreciated no matter what area or topic of study they advise. | education | self-improvement | null | null | null | 03/04/2012 05:32:01 | not constructive | Is it ok to learn computer science/programming concepts on your own outside of those being learned in class?
===
I realize that the answer to this question might seem obvious at first(who wouldn't recommend learning more?), however what I am asking is whether it is a good idea to learn concepts on your own when there is a high possibility you will cover it in class in the future. I am specifically referring to concepts covered in classes that are a part of a computer science major.
What should I learn in my spare time which will not conflict with what I will be learning in class? I understand this is a broad question, but any suggestions would be appreciated no matter what area or topic of study they advise. | 4 |
4,869,726 | 02/02/2011 00:55:50 | 242,769 | 11/25/2009 15:46:34 | 817 | 20 | Objective C - Calling a static method on a Class type object ???? | I get the following error:
**Class is not an objective c class name**
- (void)CallStaticMethodForClass :(Class *)myClass
{
[myClass doSomething];
}
+ (void)doSomething
{
//
} | objective-c | class | static-methods | null | null | null | open | Objective C - Calling a static method on a Class type object ????
===
I get the following error:
**Class is not an objective c class name**
- (void)CallStaticMethodForClass :(Class *)myClass
{
[myClass doSomething];
}
+ (void)doSomething
{
//
} | 0 |
5,733,581 | 04/20/2011 16:28:21 | 9,947 | 09/15/2008 20:32:53 | 304 | 9 | What are the advantages of using git-svn over the normal svn client? | I've seen a number of posts recently suggesting that if you have to do team development with an SVN repository, git is a better client than svn:
* [a successful workflow with git][1]
* [how to use git-svn as the only subversion client you'll ever need][2]
These articles seem to focus on the how, and skimp on the why. **Help me convince myself, boss, and peers that there's advantages to using git-svn over the official svn client!**
Note: The relative merits of git and svn are well addressed. I'm more concerned in this question with which client to use on a stipulated SVN repository.
[1]: http://www.objectpartners.com/2011/03/17/a-successful-git-svn-workflow/ "A successful workflow with git"
[2]: http://maymay.net/blog/2009/02/24/how-to-use-git-svn-as-the-only-subversion-client-youll-need/ | svn | git | git-svn | null | null | null | open | What are the advantages of using git-svn over the normal svn client?
===
I've seen a number of posts recently suggesting that if you have to do team development with an SVN repository, git is a better client than svn:
* [a successful workflow with git][1]
* [how to use git-svn as the only subversion client you'll ever need][2]
These articles seem to focus on the how, and skimp on the why. **Help me convince myself, boss, and peers that there's advantages to using git-svn over the official svn client!**
Note: The relative merits of git and svn are well addressed. I'm more concerned in this question with which client to use on a stipulated SVN repository.
[1]: http://www.objectpartners.com/2011/03/17/a-successful-git-svn-workflow/ "A successful workflow with git"
[2]: http://maymay.net/blog/2009/02/24/how-to-use-git-svn-as-the-only-subversion-client-youll-need/ | 0 |
10,174,161 | 04/16/2012 12:34:10 | 426,304 | 08/20/2010 11:51:07 | 21 | 0 | Migrating from Java 1.6.0_06 to Java 7.0 | I am analyzing Our Product Migration from Java 1.6.0_06 to Java 7.0 Run time Environment.
I am looking for expert opinion/advice on migrating to new Java environment Java 7.
I would like to know , How much stable Java 7.0 .? And , Are there any known major issue in Java 7.0 ?
Thanks and Regards,
Sharat Bhat
| java | jre | java-7 | null | null | 04/16/2012 12:47:08 | not a real question | Migrating from Java 1.6.0_06 to Java 7.0
===
I am analyzing Our Product Migration from Java 1.6.0_06 to Java 7.0 Run time Environment.
I am looking for expert opinion/advice on migrating to new Java environment Java 7.
I would like to know , How much stable Java 7.0 .? And , Are there any known major issue in Java 7.0 ?
Thanks and Regards,
Sharat Bhat
| 1 |
11,231,135 | 06/27/2012 16:41:24 | 998,989 | 10/17/2011 10:43:30 | 77 | 2 | FB intergration with xcode HACK change screen (remove) | I implimented the FB post to my app so the users can post there high scores on fb to share with there friends,
but since this i now have 2 flick screen that come up with what liike like a blue book and says hack in them ( i know this is harmless but to the users they may not see it this way) how can i remove this.
i have uploaded a 8 second vid showing this.
[VID SHOWING HACK](http://youtu.be/9_I3NAtoSTI)
| iphone | ios | xcode | facebook | facebook-graph-api | 06/28/2012 00:18:36 | not a real question | FB intergration with xcode HACK change screen (remove)
===
I implimented the FB post to my app so the users can post there high scores on fb to share with there friends,
but since this i now have 2 flick screen that come up with what liike like a blue book and says hack in them ( i know this is harmless but to the users they may not see it this way) how can i remove this.
i have uploaded a 8 second vid showing this.
[VID SHOWING HACK](http://youtu.be/9_I3NAtoSTI)
| 1 |
9,398,098 | 02/22/2012 15:47:54 | 728,246 | 02/03/2011 14:58:10 | 68 | 0 | iOS GPS accuracy, how accurate is the GPS on my iPhone 4? | I am wondering how accurate should I expect the GPS to be when developing on my iPhone 4? What are the specs? | ios | gps | null | null | null | 02/23/2012 07:34:42 | off topic | iOS GPS accuracy, how accurate is the GPS on my iPhone 4?
===
I am wondering how accurate should I expect the GPS to be when developing on my iPhone 4? What are the specs? | 2 |
2,761,156 | 05/03/2010 20:59:03 | 330,036 | 04/30/2010 19:32:02 | 8 | 0 | Avoid copying of data between user and kernel space and vice-versa | I am developing a active messaging protocol for parallel computation that replaces TCP/IP. My goal is to decrease the latency of a packet. Since the environment is a LAN, i can replace TCP/IP with simpler protocol to reduce the packet latency. I am not writing any device driver and i am just trying to replace the TCP/IP stack with something simpler. Now I wanted to avoid copying of a packet's data from user space to kernel space and **vice-versa**. I heard of the mmap(). Is it the best way to do this? If yes, it will be nice if you can give links to some examples. I am a linux newbie and i really appreciate your help.. Thank you...
Thanks,
Bala | linux | mmap | null | null | null | null | open | Avoid copying of data between user and kernel space and vice-versa
===
I am developing a active messaging protocol for parallel computation that replaces TCP/IP. My goal is to decrease the latency of a packet. Since the environment is a LAN, i can replace TCP/IP with simpler protocol to reduce the packet latency. I am not writing any device driver and i am just trying to replace the TCP/IP stack with something simpler. Now I wanted to avoid copying of a packet's data from user space to kernel space and **vice-versa**. I heard of the mmap(). Is it the best way to do this? If yes, it will be nice if you can give links to some examples. I am a linux newbie and i really appreciate your help.. Thank you...
Thanks,
Bala | 0 |
11,697,862 | 07/28/2012 02:53:28 | 406,442 | 07/30/2010 05:55:15 | 68 | 3 | Windows Azure - is this possible? | I'm new to Azure (I've only worked with AWS), so please pardon me if this is naive.
I'm currently building an infrastructure which does the following:
1. There is a pool of servers, where the number of servers is elastic based on some logic (say on load, where load is not just number of clients). I want to add/remove instances programatically using a master.
2. The pool of servers host a web service, and I want outside clients to connect based on some criteria. I was thinking the master above could do the partitioning and client assignment.
Is this possible in Azure? Can I change the default load balancing to return a custom DNS address to the client? | azure | load-balancing | partitioning | null | null | 07/28/2012 14:51:14 | off topic | Windows Azure - is this possible?
===
I'm new to Azure (I've only worked with AWS), so please pardon me if this is naive.
I'm currently building an infrastructure which does the following:
1. There is a pool of servers, where the number of servers is elastic based on some logic (say on load, where load is not just number of clients). I want to add/remove instances programatically using a master.
2. The pool of servers host a web service, and I want outside clients to connect based on some criteria. I was thinking the master above could do the partitioning and client assignment.
Is this possible in Azure? Can I change the default load balancing to return a custom DNS address to the client? | 2 |
10,568,981 | 05/13/2012 02:55:23 | 1,320,817 | 04/08/2012 21:21:49 | 22 | 1 | What programing language is this | Someone know what kind of language used below
Thanks in advanced!
String^ fileName = "C:\\Test1.txt";
array<Byte>^ Array = gcnew array<Byte>(512);
try
{
FileStream^ fs = File::OpenRead(fileName);
fs->Read(Array, 0, 512);fs->Close();
}
catch (...)
{
MessageBox::Show("Disk error");
Application::Exit();
}
and another example of that language
int RotateLeft3 (int number)
{
if ( ( number & 0x20000000 ) == 0x20000000 )
{
number <<= 3;number |= 1;
}
else
number <<= 3;
return number;
} | programming-languages | null | null | null | null | 05/13/2012 13:04:14 | off topic | What programing language is this
===
Someone know what kind of language used below
Thanks in advanced!
String^ fileName = "C:\\Test1.txt";
array<Byte>^ Array = gcnew array<Byte>(512);
try
{
FileStream^ fs = File::OpenRead(fileName);
fs->Read(Array, 0, 512);fs->Close();
}
catch (...)
{
MessageBox::Show("Disk error");
Application::Exit();
}
and another example of that language
int RotateLeft3 (int number)
{
if ( ( number & 0x20000000 ) == 0x20000000 )
{
number <<= 3;number |= 1;
}
else
number <<= 3;
return number;
} | 2 |
7,135,170 | 08/20/2011 22:39:50 | 437,969 | 09/02/2010 12:47:11 | 130 | 0 | Mac OSX Lion Mail Not Sending | When I upgraded to MAC OSX Lion, I consistently have issues sending mail from MAC mail.app. I can receive mail but when I send mail it just stays in the outbox. Sometimes I can send the mail in the outbox by deleting it, rebooting my MacBook Pro, and then recreate the mail and send it out.
Does any one know a solution?
| osx | email | osx-lion | null | null | 08/21/2011 01:26:17 | off topic | Mac OSX Lion Mail Not Sending
===
When I upgraded to MAC OSX Lion, I consistently have issues sending mail from MAC mail.app. I can receive mail but when I send mail it just stays in the outbox. Sometimes I can send the mail in the outbox by deleting it, rebooting my MacBook Pro, and then recreate the mail and send it out.
Does any one know a solution?
| 2 |
9,653,728 | 03/11/2012 09:11:02 | 1,200,794 | 02/09/2012 22:15:23 | 7 | 0 | AsyncSocket for iOS never connects in NSThread | I am working with the AsyncSocket for iOS. (https://github.com/robbiehanson/CocoaAsyncSocket)
I need a loop to connect to a server (send and read a message) every second. Therefor I created a class which is a subclass of NSThread and using the main-Method and start-Method for starting the Thread.
The Problem is that the app is starting to connect to the server but never finishes (never call a delegate). And if the loop after one second reach the point to connect again to server the app crashes with the error "Attempting to connect while connected or accepting connections. Disconnect first."
Maybe it has something to do with:
> If you find yourself on a thread which is different from the thread on
> which AsyncSocket is running, and you need to invoke a method on
> AsyncSocket, then you must use a method like performSelector:onThread:
> to ensure the method is invoked on AsyncSocket's thread (and thereby
> maintaining thread-safety).
But I don't have any idea.
Thanks for your help | ios | nsthread | asyncsocket | null | null | 03/16/2012 07:34:21 | too localized | AsyncSocket for iOS never connects in NSThread
===
I am working with the AsyncSocket for iOS. (https://github.com/robbiehanson/CocoaAsyncSocket)
I need a loop to connect to a server (send and read a message) every second. Therefor I created a class which is a subclass of NSThread and using the main-Method and start-Method for starting the Thread.
The Problem is that the app is starting to connect to the server but never finishes (never call a delegate). And if the loop after one second reach the point to connect again to server the app crashes with the error "Attempting to connect while connected or accepting connections. Disconnect first."
Maybe it has something to do with:
> If you find yourself on a thread which is different from the thread on
> which AsyncSocket is running, and you need to invoke a method on
> AsyncSocket, then you must use a method like performSelector:onThread:
> to ensure the method is invoked on AsyncSocket's thread (and thereby
> maintaining thread-safety).
But I don't have any idea.
Thanks for your help | 3 |
3,979,302 | 10/20/2010 15:05:14 | 481,888 | 10/20/2010 15:05:14 | 1 | 0 | What is a good configuration file tool for C# | I'm writing a new C# application which will make heavy use of a configuration file. My requirements are:
1. Human readable
2. Name value pairs
3. Hierarchical
4. [Updatable by application]
Um, to translate: I want to define an object and a set of configuration parameters associated with that object. The configuration parameters may be name value pairs or another object, with it's own attributes attached:
module "db" {
host: "db.example.com";
encoder "zip" {
compression: 10;
}
}
I'm less committed to requirement 4, but do consider that I would like the application to update a setting and write it back to the configuration file.
I am aware of the following options:
1. XML. Not sufficiently human readable.
2. INI file. Not hierarchal
3. JSON.
4. YAML.
JSON and YAML seem worth investigating.
Advise on using these for configuration? Any alternate tools I may want to consider?
As for persisting changes made by the application back to the config file I know that JSON and YAML can do this but can either do this WHILE saving comments which may have been in the original human edited version? | .net | configuration-files | null | null | null | null | open | What is a good configuration file tool for C#
===
I'm writing a new C# application which will make heavy use of a configuration file. My requirements are:
1. Human readable
2. Name value pairs
3. Hierarchical
4. [Updatable by application]
Um, to translate: I want to define an object and a set of configuration parameters associated with that object. The configuration parameters may be name value pairs or another object, with it's own attributes attached:
module "db" {
host: "db.example.com";
encoder "zip" {
compression: 10;
}
}
I'm less committed to requirement 4, but do consider that I would like the application to update a setting and write it back to the configuration file.
I am aware of the following options:
1. XML. Not sufficiently human readable.
2. INI file. Not hierarchal
3. JSON.
4. YAML.
JSON and YAML seem worth investigating.
Advise on using these for configuration? Any alternate tools I may want to consider?
As for persisting changes made by the application back to the config file I know that JSON and YAML can do this but can either do this WHILE saving comments which may have been in the original human edited version? | 0 |
4,020,964 | 10/26/2010 05:32:08 | 197,036 | 10/27/2009 03:15:27 | 475 | 3 | SO: what does this css selector mean | When I check the css of SO code, there is one line:
.btn - delete {
has '-' and spaces inside it, what does this mean?
I don't see this kind of selector in
http://www.w3.org/TR/CSS2/selector.html | javascript | css | jquery-validate | null | null | 02/23/2012 20:07:22 | too localized | SO: what does this css selector mean
===
When I check the css of SO code, there is one line:
.btn - delete {
has '-' and spaces inside it, what does this mean?
I don't see this kind of selector in
http://www.w3.org/TR/CSS2/selector.html | 3 |
6,095,798 | 05/23/2011 10:14:14 | 304,586 | 03/29/2010 20:49:37 | 78 | 1 | Enable errors in browser when parsing PHP-files. | I recently changed to a MacBook and now use the MAMP-stack for development locally.
In my earlier development environment I always could see informative error-reports when I tried to access a PHP file through a web-browser and an error occurred. With the default installation of MAMP it seems that this feature is disabled, whenever I hit an error I can't see the cause of it, I can't even see a single line informing me that an error occurred.
Not until I start to debug the code in a debugger I can see where the error occurred.
Any idea how error reporting can be turned on?
I tried:
error_reporting(E_ALL);
No effect at all though.
| php | mamp | error-reporting | null | null | null | open | Enable errors in browser when parsing PHP-files.
===
I recently changed to a MacBook and now use the MAMP-stack for development locally.
In my earlier development environment I always could see informative error-reports when I tried to access a PHP file through a web-browser and an error occurred. With the default installation of MAMP it seems that this feature is disabled, whenever I hit an error I can't see the cause of it, I can't even see a single line informing me that an error occurred.
Not until I start to debug the code in a debugger I can see where the error occurred.
Any idea how error reporting can be turned on?
I tried:
error_reporting(E_ALL);
No effect at all though.
| 0 |
5,667,591 | 04/14/2011 18:08:51 | 708,495 | 04/14/2011 18:08:51 | 1 | 0 | Blackberry App World Null Pointer Exception on launch | A few weeks ago Blackberry App World announced a new version, so I upgraded. Ever since then I get a null pointer exception a few seconds after I launch it. I have deleted the app, rebooted, and reinstalled (with two different versions of App World) - same result. Here's the log entry:
Name: NullPointerException
GUID: 9c3cd62e3320b498
Time: Apr 14, 2011 14:01:12
No detail message
net_rim_cldc(4AA20FC2)
Hashtable
put
0x51EF
net_rim_cldc-1(4AA20FC2)
CodeModuleGroupProperties
put
0xE12
net_rim_cldc-6(4AA20FC2)
CodeModuleGroup
setProperty
0x9935
net_rim_bb_appworld_lib-7(4D6C1597)
ModuleGroupPropertyUpdater
update
0x482F
net_rim_bb_appworld_lib-6(4D6C1597)
Content
reconcileExistingInstallation
0x23D6
net_rim_bb_appworld_lib-6(4D6C1597)
ContentDatabase
reconcileExistingModuleGroups
0x4E18
net_rim_bb_appworld_lib-6(4D6C1597)
ContentDatabase$ContentDBReconcileTask
run
0x523D
net_rim_bb_appworld_lib-6(4D6C1597)
ContentDatabase
clear
0x5109
net_rim_bb_appworld_lib-2(4D6C1597)
ContentStore
clearPersistedData
0x6DC
net_rim_bb_appworld_lib-2(4D6C1597)
ContentStore
<init>
0x610
net_rim_bb_appworld_lib-2(4D6C1597)
ContentStore
startAppWorld
0x51A
net_rim_bb_appworld(4D6C15CB)
BlackBerryAppWorldMain
main
0x31
| blackberry | null | null | null | null | 04/16/2011 22:28:51 | off topic | Blackberry App World Null Pointer Exception on launch
===
A few weeks ago Blackberry App World announced a new version, so I upgraded. Ever since then I get a null pointer exception a few seconds after I launch it. I have deleted the app, rebooted, and reinstalled (with two different versions of App World) - same result. Here's the log entry:
Name: NullPointerException
GUID: 9c3cd62e3320b498
Time: Apr 14, 2011 14:01:12
No detail message
net_rim_cldc(4AA20FC2)
Hashtable
put
0x51EF
net_rim_cldc-1(4AA20FC2)
CodeModuleGroupProperties
put
0xE12
net_rim_cldc-6(4AA20FC2)
CodeModuleGroup
setProperty
0x9935
net_rim_bb_appworld_lib-7(4D6C1597)
ModuleGroupPropertyUpdater
update
0x482F
net_rim_bb_appworld_lib-6(4D6C1597)
Content
reconcileExistingInstallation
0x23D6
net_rim_bb_appworld_lib-6(4D6C1597)
ContentDatabase
reconcileExistingModuleGroups
0x4E18
net_rim_bb_appworld_lib-6(4D6C1597)
ContentDatabase$ContentDBReconcileTask
run
0x523D
net_rim_bb_appworld_lib-6(4D6C1597)
ContentDatabase
clear
0x5109
net_rim_bb_appworld_lib-2(4D6C1597)
ContentStore
clearPersistedData
0x6DC
net_rim_bb_appworld_lib-2(4D6C1597)
ContentStore
<init>
0x610
net_rim_bb_appworld_lib-2(4D6C1597)
ContentStore
startAppWorld
0x51A
net_rim_bb_appworld(4D6C15CB)
BlackBerryAppWorldMain
main
0x31
| 2 |
3,601,718 | 08/30/2010 15:15:08 | 414,507 | 08/08/2010 18:01:12 | 6 | 0 | How do I add a record in my database when it is coming from a checklist box control from vb.net? | I'm having trouble on how to code this. First I need to assign a value for every item in the list(1 for the first item, 2 for the 2nd and so on) Does this control have a separate field for the value aside from text?
Second, I need to insert this into my database(MSSQL 2008) in this format:
insert into table values(ID, *selectedvaluegoeshere*)
Can someone guide me on how to achieve this. | sql | database | vb.net | checklist | null | null | open | How do I add a record in my database when it is coming from a checklist box control from vb.net?
===
I'm having trouble on how to code this. First I need to assign a value for every item in the list(1 for the first item, 2 for the 2nd and so on) Does this control have a separate field for the value aside from text?
Second, I need to insert this into my database(MSSQL 2008) in this format:
insert into table values(ID, *selectedvaluegoeshere*)
Can someone guide me on how to achieve this. | 0 |
2,824,883 | 05/13/2010 06:44:50 | 227,809 | 12/09/2009 09:14:32 | 122 | 10 | Active Directory login - DirectoryEntry inconsistent exception | I need to validate the LDAP user by checking if there exists such a user name in the specified domain. For this I am using this code -
DirectoryEntry entry = new DirectoryEntry("LDAP://" + strDomainController);
DirectorySearcher searcher = new DirectorySearcher(entry);
searcher.Filter = "SAMAccountName=" + strUserName;
SearchResult result = searcher.FindOne();
return (result != null) ? true : false;
This is a method in a class library which I intened to reference and use whereever I need this functionality in my project.
To test this, I created a simple test application. The test occurs like this -
Console.WriteLine(MyClassLib.MyValidateUserMethod("UserName", "Domain",ref strError).ToString());
The problem I am facing is that this works fine when I test it with my testapp but in my project, when I try to use the same method with the same credentials - The `DirectoryEntry` object throws an `"System.DirectoryServices.DirectoryServicesCOMException"` exception and the `search.Filter` fails and throws ex = {"Logon failure: unknown user name or bad password.\r\n"} exception.
I have tried impersonation but that doesn't help. Somehow the same method works fine in mytestapp and doesn't work in my project. Both these applications are in my local dev machine. What am I missing? Any ideas? | ldap | directoryentry | c# | active-directory | exception | null | open | Active Directory login - DirectoryEntry inconsistent exception
===
I need to validate the LDAP user by checking if there exists such a user name in the specified domain. For this I am using this code -
DirectoryEntry entry = new DirectoryEntry("LDAP://" + strDomainController);
DirectorySearcher searcher = new DirectorySearcher(entry);
searcher.Filter = "SAMAccountName=" + strUserName;
SearchResult result = searcher.FindOne();
return (result != null) ? true : false;
This is a method in a class library which I intened to reference and use whereever I need this functionality in my project.
To test this, I created a simple test application. The test occurs like this -
Console.WriteLine(MyClassLib.MyValidateUserMethod("UserName", "Domain",ref strError).ToString());
The problem I am facing is that this works fine when I test it with my testapp but in my project, when I try to use the same method with the same credentials - The `DirectoryEntry` object throws an `"System.DirectoryServices.DirectoryServicesCOMException"` exception and the `search.Filter` fails and throws ex = {"Logon failure: unknown user name or bad password.\r\n"} exception.
I have tried impersonation but that doesn't help. Somehow the same method works fine in mytestapp and doesn't work in my project. Both these applications are in my local dev machine. What am I missing? Any ideas? | 0 |
4,179,513 | 11/14/2010 20:24:00 | 507,508 | 11/14/2010 18:02:45 | 1 | 0 | Excel - VBA - Save Data to Access Database | Im wokring on excel with VBA and access and i need my system to save its data to an Access database and whenever any new records added, deleted or modified the database should update.
I would like to link my spreadsheet and database using ADO but i couldn't find any online resources to help me with that.
Can you please let me know what i need to now in order to do that and any link that you may know that will be usefull?
Thank you
Andrew | excel-vba | access-vba | null | null | null | null | open | Excel - VBA - Save Data to Access Database
===
Im wokring on excel with VBA and access and i need my system to save its data to an Access database and whenever any new records added, deleted or modified the database should update.
I would like to link my spreadsheet and database using ADO but i couldn't find any online resources to help me with that.
Can you please let me know what i need to now in order to do that and any link that you may know that will be usefull?
Thank you
Andrew | 0 |
6,273,664 | 06/08/2011 02:44:15 | 509,754 | 11/16/2010 16:18:00 | 64 | 18 | wordpress site showing web attack exploit kit variant 3 | I was asked to look at a wordpress site for a client this morning because on some of the employers computers their was a web attack viruses showing up when they were on a certain page. I've been trying to google the exploit but havent been able to find much. I was wondering if anyone else has ever experienced this or has a solution to fix it. I was going to try to backup the database and start with a fresh wordpress install and see if the virus still continues to show. | php | security | wordpress | virus | exploit | 06/08/2011 03:06:51 | off topic | wordpress site showing web attack exploit kit variant 3
===
I was asked to look at a wordpress site for a client this morning because on some of the employers computers their was a web attack viruses showing up when they were on a certain page. I've been trying to google the exploit but havent been able to find much. I was wondering if anyone else has ever experienced this or has a solution to fix it. I was going to try to backup the database and start with a fresh wordpress install and see if the virus still continues to show. | 2 |
5,464,749 | 03/28/2011 20:33:46 | 126,091 | 06/20/2009 06:32:11 | 166 | 5 | How do I add a CRL address to a self-signed CA certificate? | This is an extension question to:
[how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows][1]
To take this further, if I have created a CA cert, and have create a set of SPC certs, how do I go about creating revocation lists and distributing them? (note: I have no knowledge about how CRLs work, how they are distributed etc) If I were to GUESS how it all worked, I would hope that the CA cert defined some HTTP address where CRLs could be downloaded, and windows would contact that address the first time a cert chain was queried, and every time the current CRL expires... Then all I would have to do is create a signed web address that distributes certificate serial numbers...?
[1]: http://stackoverflow.com/questions/84847/how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows/201277#201277 | security | code-signing | null | null | null | null | open | How do I add a CRL address to a self-signed CA certificate?
===
This is an extension question to:
[how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows][1]
To take this further, if I have created a CA cert, and have create a set of SPC certs, how do I go about creating revocation lists and distributing them? (note: I have no knowledge about how CRLs work, how they are distributed etc) If I were to GUESS how it all worked, I would hope that the CA cert defined some HTTP address where CRLs could be downloaded, and windows would contact that address the first time a cert chain was queried, and every time the current CRL expires... Then all I would have to do is create a signed web address that distributes certificate serial numbers...?
[1]: http://stackoverflow.com/questions/84847/how-do-i-create-a-self-signed-certificate-for-code-signing-on-windows/201277#201277 | 0 |
11,535,669 | 07/18/2012 06:44:45 | 1,530,378 | 07/17/2012 00:56:55 | 1 | 0 | trouble in making the if stament work with the math | hi i am new in xcode with the if statement for weight
int weight;
if (weight <10) {
([ input.text * @" 100 " Floatvalue); }
if (weight 10-20){
([ input.text == 1000 + 50 for each kg more than 10);}
if (weight >20 ){
([ input.text == 1000 + 20 for each kg more than 20);}
| objective-c | xcode | null | null | null | 07/19/2012 00:57:14 | not a real question | trouble in making the if stament work with the math
===
hi i am new in xcode with the if statement for weight
int weight;
if (weight <10) {
([ input.text * @" 100 " Floatvalue); }
if (weight 10-20){
([ input.text == 1000 + 50 for each kg more than 10);}
if (weight >20 ){
([ input.text == 1000 + 20 for each kg more than 20);}
| 1 |
10,182,044 | 04/16/2012 21:35:01 | 1,294,954 | 03/27/2012 08:19:02 | 1 | 0 | Administration interface for wlan-routers | I would like to create a basic web application to configure devices like wlan-routers. I have here an 500 Mhz based linux device where I need to change network settings and system settings (hostname, date, time...). I would like to do this with ruby on rails.
Are there any available open source projects out where I can contribute to? I think that
the best would be to create model instances via basic system calls like ifconfig or via dbus.
Has anyone experiences in that area? I think that the hardest part is the model layer so that
interaction with the running system can be done. | linux | ruby-on-rails-3 | embedded | web-interface | null | null | open | Administration interface for wlan-routers
===
I would like to create a basic web application to configure devices like wlan-routers. I have here an 500 Mhz based linux device where I need to change network settings and system settings (hostname, date, time...). I would like to do this with ruby on rails.
Are there any available open source projects out where I can contribute to? I think that
the best would be to create model instances via basic system calls like ifconfig or via dbus.
Has anyone experiences in that area? I think that the hardest part is the model layer so that
interaction with the running system can be done. | 0 |
1,888,139 | 12/11/2009 13:40:12 | 126,545 | 06/21/2009 19:04:55 | 60 | 2 | Python twisted: where to start | I am trying to start learning twisted for socket servers creation. I want to add some useful features (like auth, and maybe some other). Maybe someone can point me to a good tutorial which will help me to start (+ maybe some other ideas) | python | twisted | null | null | null | 07/22/2012 14:12:00 | not constructive | Python twisted: where to start
===
I am trying to start learning twisted for socket servers creation. I want to add some useful features (like auth, and maybe some other). Maybe someone can point me to a good tutorial which will help me to start (+ maybe some other ideas) | 4 |
3,664,986 | 09/08/2010 05:58:45 | 442,093 | 09/08/2010 05:58:45 | 1 | 0 | How would you compare two IP addresses to see which one is greater? | For example, following are two sets of IP addresses, now, how would you identify the greater IP for each set?
SET A:
10.192.3.177 and 10.192.2.204
SET B:
10.192.3.205 and 10.192.2.204
Thanks!! | ip-address | ip | null | null | null | null | open | How would you compare two IP addresses to see which one is greater?
===
For example, following are two sets of IP addresses, now, how would you identify the greater IP for each set?
SET A:
10.192.3.177 and 10.192.2.204
SET B:
10.192.3.205 and 10.192.2.204
Thanks!! | 0 |
11,744,105 | 07/31/2012 15:51:43 | 901,790 | 08/19/2011 04:44:29 | 52 | 0 | how to display an array and create index routes from it in rails | I have an array and would like to display it in a rails view and then be able to create links to another view from each one of the arrays, how can i do this guys. | ruby | ruby-on-rails-3 | null | null | null | 07/31/2012 16:12:40 | not a real question | how to display an array and create index routes from it in rails
===
I have an array and would like to display it in a rails view and then be able to create links to another view from each one of the arrays, how can i do this guys. | 1 |
4,262,182 | 11/23/2010 23:40:04 | 315,471 | 04/13/2010 12:40:54 | 110 | 5 | Interface Builder Tips/Tricks Useful for a Beginner | What are some useful tips/tricks for Interface Builder that would be relevant for a beginner? | iphone | ipad | interface-builder | null | null | 11/28/2011 01:54:21 | not constructive | Interface Builder Tips/Tricks Useful for a Beginner
===
What are some useful tips/tricks for Interface Builder that would be relevant for a beginner? | 4 |
10,995,700 | 06/12/2012 11:27:37 | 808,808 | 06/21/2011 16:00:50 | 240 | 15 | Integer[] not working in Intent#putExtra(...) | I want to put an `int[]` into an Android Intent. For various reasons I am getting a `LinkedList<Integer>`, so I tried (roughly) this:
LinkedList<Integer> myList = getIntegerList();
Intent intent = new Intent (context, class);
intent.putExtra("com.me.INTARRAY", myList.toArray());
This didn't work because `toArray()` was giving me an `Object[]`. I thought I could fix it by doing
intent.putExtra("com.me.INTARRAY", (Integer[]) myList.toArray(new Integer[myList.size()]) )
which does indeed produce an `Integer[]`; however, getting it out of the `Intent` STILL doesn't work.
Ultimately this isn't too hard to work around with a `for` loop so I ask more for curiosity than any other reason, but ... how do you get an `Integer[]` into an `Intent` extra as though it were an `int[]`? | android | arrays | android-intent | extra | null | null | open | Integer[] not working in Intent#putExtra(...)
===
I want to put an `int[]` into an Android Intent. For various reasons I am getting a `LinkedList<Integer>`, so I tried (roughly) this:
LinkedList<Integer> myList = getIntegerList();
Intent intent = new Intent (context, class);
intent.putExtra("com.me.INTARRAY", myList.toArray());
This didn't work because `toArray()` was giving me an `Object[]`. I thought I could fix it by doing
intent.putExtra("com.me.INTARRAY", (Integer[]) myList.toArray(new Integer[myList.size()]) )
which does indeed produce an `Integer[]`; however, getting it out of the `Intent` STILL doesn't work.
Ultimately this isn't too hard to work around with a `for` loop so I ask more for curiosity than any other reason, but ... how do you get an `Integer[]` into an `Intent` extra as though it were an `int[]`? | 0 |
7,452,183 | 09/17/2011 03:06:34 | 949,810 | 09/17/2011 03:06:34 | 1 | 0 | Where can i get lio-core-2.6? | With no ETA on when Kernel.org will be back online, i am looking for other options.
I've tried http://her.gr.distfiles.macports.org/mirrors/ftp.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git and some other links from Google's cache page...but i have not had any success.
Anyone have any idea how to get this installed? | git | iscsi | null | null | null | 09/18/2011 02:00:25 | off topic | Where can i get lio-core-2.6?
===
With no ETA on when Kernel.org will be back online, i am looking for other options.
I've tried http://her.gr.distfiles.macports.org/mirrors/ftp.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git and some other links from Google's cache page...but i have not had any success.
Anyone have any idea how to get this installed? | 2 |
8,898,771 | 01/17/2012 17:10:43 | 729,433 | 04/28/2011 13:40:54 | 379 | 15 | Asp.Net Mvc 2 Checkbox always false in model | I have a checkbox like this:
<%= Html.CheckBoxFor(x => x.IsSendingQualitySurvey) %>/>
when checking the checkbox and submitting, I get the typical 2 form values:
IsSendingQualitySurvey: true
IsSendingQualitySurvey: false
This is perfectly valid for the way the mvc modelbinder handles checkboxes.
Then in the controller action:
[HttpPost]
public ActionResult Edit(Guid id, TicketEditViewModel ticketEditViewModel)
`ticketEditViewModel.IsSendingQualitySurvey` (a normal bool) is always false.
I don't have any custom model binders and it works elsewhere.
Strangely enough I've had the same problem in another view quite a while ago, where I had to create the input manually, looks like this:
<input type="checkbox" value="true" name="<%=Html.NameFor(x => x.IsRequestingVisit) %>" id="<%=Html.NameFor(x => x.IsRequestingVisit) %>" />
This worked, but when I copied the exact same over to the other view, the value is still always false.
Wheres the catch?
Thanks. | asp.net-mvc | null | null | null | null | null | open | Asp.Net Mvc 2 Checkbox always false in model
===
I have a checkbox like this:
<%= Html.CheckBoxFor(x => x.IsSendingQualitySurvey) %>/>
when checking the checkbox and submitting, I get the typical 2 form values:
IsSendingQualitySurvey: true
IsSendingQualitySurvey: false
This is perfectly valid for the way the mvc modelbinder handles checkboxes.
Then in the controller action:
[HttpPost]
public ActionResult Edit(Guid id, TicketEditViewModel ticketEditViewModel)
`ticketEditViewModel.IsSendingQualitySurvey` (a normal bool) is always false.
I don't have any custom model binders and it works elsewhere.
Strangely enough I've had the same problem in another view quite a while ago, where I had to create the input manually, looks like this:
<input type="checkbox" value="true" name="<%=Html.NameFor(x => x.IsRequestingVisit) %>" id="<%=Html.NameFor(x => x.IsRequestingVisit) %>" />
This worked, but when I copied the exact same over to the other view, the value is still always false.
Wheres the catch?
Thanks. | 0 |
6,513,177 | 06/28/2011 21:16:00 | 395,258 | 07/18/2010 17:06:28 | 670 | 31 | dbDelta/SQL error, very unexpected | Here's an error that I'm having trouble with. It occurs when I use the dbDelta function in Wordpress. I can't really figure it out, perhaps someone else has experience something similar? My code:
$sql1 = "CREATE TABLE `".$table_name1."` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`blogid` INT( 11 ) NOT NULL ,
`symbol` VARCHAR( 255 ) NOT NULL
) ENGINE = MYISAM";
I trigger this code during the theme_switch action. And it does not seem to occur when I turn the theme on, only when I switch to something else (I know, it's weird). I have read and I have attempted to follow the caveats mentioned at <a href="http://codex.wordpress.org/Creating_Tables_with_Plugins">Wordpress.org</a>, for example putting two spaces between primary key and the definition. I have two other, similar, pieces of SQL code that generate the same error; all three were originally generated by phpMyAdmin so I know that they work.
Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php on line 1463
Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php on line 1463
Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php on line 1463
WordPress database error: [Multiple primary key defined]
ALTER TABLE wp_stocks_0 CHANGE COLUMN id `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY
Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php:1463) in /Applications/MAMP/htdocs/wp-experiment/wp-includes/pluggable.php on line 897 | sql | wordpress | null | null | null | null | open | dbDelta/SQL error, very unexpected
===
Here's an error that I'm having trouble with. It occurs when I use the dbDelta function in Wordpress. I can't really figure it out, perhaps someone else has experience something similar? My code:
$sql1 = "CREATE TABLE `".$table_name1."` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`blogid` INT( 11 ) NOT NULL ,
`symbol` VARCHAR( 255 ) NOT NULL
) ENGINE = MYISAM";
I trigger this code during the theme_switch action. And it does not seem to occur when I turn the theme on, only when I switch to something else (I know, it's weird). I have read and I have attempted to follow the caveats mentioned at <a href="http://codex.wordpress.org/Creating_Tables_with_Plugins">Wordpress.org</a>, for example putting two spaces between primary key and the definition. I have two other, similar, pieces of SQL code that generate the same error; all three were originally generated by phpMyAdmin so I know that they work.
Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php on line 1463
Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php on line 1463
Notice: Undefined offset: 1 in /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php on line 1463
WordPress database error: [Multiple primary key defined]
ALTER TABLE wp_stocks_0 CHANGE COLUMN id `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY
Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/wp-experiment/wp-admin/includes/upgrade.php:1463) in /Applications/MAMP/htdocs/wp-experiment/wp-includes/pluggable.php on line 897 | 0 |
5,636,805 | 04/12/2011 14:24:36 | 704,254 | 04/12/2011 14:11:18 | 1 | 0 | Example of extreme, over the top oop | Now I'm a hobby programmer and would never take a job programming even though i do enjoy programming for myself. Of course i have read some books about oop but today a question popped into my head.
one of the common examples of oop is the car one. every car has tires, and a truck is a type of car, but different then a Lamborghini that is also a type of car.
My question is such.
Has anyone taken this to the extreme and made a working program out of it?
by extreme i mean things like tire objects with current rotation, air pressure, ect ect, gas tank objects, engine objects with piston objects? | oop | null | null | null | null | 04/12/2011 14:44:05 | not constructive | Example of extreme, over the top oop
===
Now I'm a hobby programmer and would never take a job programming even though i do enjoy programming for myself. Of course i have read some books about oop but today a question popped into my head.
one of the common examples of oop is the car one. every car has tires, and a truck is a type of car, but different then a Lamborghini that is also a type of car.
My question is such.
Has anyone taken this to the extreme and made a working program out of it?
by extreme i mean things like tire objects with current rotation, air pressure, ect ect, gas tank objects, engine objects with piston objects? | 4 |
10,153,876 | 04/14/2012 13:07:28 | 1,324,619 | 04/10/2012 16:51:59 | 30 | 0 | How to implement my code in MVC Java? | I am making a game which will have three games implemented in it. I started off my code in a single class, now that I want to move it around into a MVC format I am having errors. I started off with writing all the code in GameView Class, I now want to move some of the code from this class to a SView Class. The problem is that I have intialised the JFrame in GameView class and it cannot find the variable frame when I move my code to SView class. So then I have been told to make it into a panel and then move it but it's just messing up my game. Below is my code.
GameView Class:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class GameView
{
Pieces piece;
Players player;
/**
* Constructor for objects of class GameView
*/
public GameView()
{
gui();
}
/**
* Setting up the GUI. JFrame, Panels, setting the sizes, colour etc.
*/
public void gui()
{
//Initialising the object
BorderLayout borderlayout = new BorderLayout();
Players player = new Players();
Pieces piece = new Pieces();
//Creates the frame, set the visibility to true, sets the size and exit on close
JFrame frame = new JFrame("Games");
frame.setVisible(true);
frame.setSize(600,400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Creates the menu bar and the content it holds
JMenuBar menubar = new JMenuBar();
frame.setJMenuBar(menubar);
JMenu selectGame = new JMenu("Select Game");
menubar.add(selectGame);
JMenuItem cGame = new JMenuItem("CGame");
JMenuItem mGame = new JMenuItem("MGame");
JMenuItem sGame = new JMenuItem("SGame");
selectGame.add(cGame);
selectGame.add(mGame);
selectGame.add(sGame);
//Copy From here//Get the Images for the game pieces from piece class
piece.pieceOne();
piece.pieceTwo();
//Creates the button using the loop, adds it into the panel and frame.
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(3,10));
JButton [] buttons = new JButton[30];
for(int i=0;i<30;i++){
buttons[i] = new JButton("" + i);
buttons[i].setBackground(Color.white);
//Puts the player 1 piece on button 1,3,5,7,9 and player 2 piece on button 2,4,6,8,10
if (i < 10) {
if (i%2 == 0) {
buttons[i].setIcon(piece.getPieceOne());
} else {
buttons[i].setIcon(piece.getPieceTwo());
}
}
panel.add(buttons[i]);
}
frame.add(panel, BorderLayout.CENTER);
//Creates the Throw stick button
Panel p = new Panel();
p.setLayout(new GridLayout());
final Dice dice = new Dice();
Button button = new Button("Throw Dice");
final Label label = new Label("Dice Draw");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dice.randomGenerator();
label.setText(Integer.toString(dice.getDiceResult()));
}
});
p.add(button);
p.add(label);
p.setBackground(new Color(156, 93, 82));
frame.add(p, BorderLayout.SOUTH);
//Creates the label which goes to the either side of the board, holds the player 1 and player 2 name.
Panel p2 = new Panel();
p2.setLayout(new BorderLayout());
JLabel player1Lbl = new JLabel("Player 1");
player.enterNameP1();
player1Lbl.setText(player.getPlayer1Name());
p2.add(player1Lbl, BorderLayout.WEST);
JLabel player2Lbl = new JLabel("Player 2");
player.enterNameP2();
player2Lbl.setText(player.getPlayer2Name());
p2.add(player2Lbl, BorderLayout.EAST);
p2.add(new Label("SENET GAME"), BorderLayout.NORTH );
p2.setBackground(new Color(156, 93, 82));
p2.setFont(new Font("sansserif", Font.BOLD, 18));
frame.add(p2);
//Additional settings to the frame and the panel
panel.setBackground(new Color(156, 93, 82));
panel.setLayout(new GridLayout(3,10));
panel.setSize(new Dimension(400, 200));
panel.setLocation((frame.getWidth()-panel.getWidth())/2, 80); ///Copy till here
frame.setBackground(new Color(156, 93, 82));
frame.setSize(new Dimension(600, 400));
frame.setResizable(false);
}
}
Below is the code I copied from GameView class which I need in Sview Class, How can i sort the variable frame when it is initialised in GameView?
SView Class:
Public SView()
{
//Get the Images for the game pieces from piece class
piece.pieceOne();
piece.pieceTwo();
//Creates the button using the loop, adds it into the panel and frame.
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(3,10));
JButton [] buttons = new JButton[30];
for(int i=0;i<30;i++){
buttons[i] = new JButton("" + i);
buttons[i].setBackground(Color.white);
//Puts the player 1 piece on button 1,3,5,7,9 and player 2 piece on button 2,4,6,8,10
if (i < 10) {
if (i%2 == 0) {
buttons[i].setIcon(piece.getPieceOne());
} else {
buttons[i].setIcon(piece.getPieceTwo());
}
}
panel.add(buttons[i]);
}
frame.add(panel, BorderLayout.CENTER);
//Creates the Throw stick button
Panel p = new Panel();
p.setLayout(new GridLayout());
final Dice dice = new Dice();
Button button = new Button("Throw Dice");
final Label label = new Label("Dice Draw");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dice.randomGenerator();
label.setText(Integer.toString(dice.getDiceResult()));
}
});
p.add(button);
p.add(label);
p.setBackground(new Color(156, 93, 82));
frame.add(p, BorderLayout.SOUTH);
//Creates the label which goes to the either side of the board, holds the player 1 and player 2 name.
Panel p2 = new Panel();
p2.setLayout(new BorderLayout());
JLabel player1Lbl = new JLabel("Player 1");
player.enterNameP1();
player1Lbl.setText(player.getPlayer1Name());
p2.add(player1Lbl, BorderLayout.WEST);
JLabel player2Lbl = new JLabel("Player 2");
player.enterNameP2();
player2Lbl.setText(player.getPlayer2Name());
p2.add(player2Lbl, BorderLayout.EAST);
p2.add(new Label("SGAME"), BorderLayout.NORTH );
p2.setBackground(new Color(156, 93, 82));
p2.setFont(new Font("sansserif", Font.BOLD, 18));
frame.add(p2);
//Additional settings to the frame and the panel
panel.setBackground(new Color(156, 93, 82));
panel.setLayout(new GridLayout(3,10));
panel.setSize(new Dimension(400, 200));
panel.setLocation((frame.getWidth()-panel.getWidth())/2, 80);
}
| java | mvc | jframe | hierarchy | null | null | open | How to implement my code in MVC Java?
===
I am making a game which will have three games implemented in it. I started off my code in a single class, now that I want to move it around into a MVC format I am having errors. I started off with writing all the code in GameView Class, I now want to move some of the code from this class to a SView Class. The problem is that I have intialised the JFrame in GameView class and it cannot find the variable frame when I move my code to SView class. So then I have been told to make it into a panel and then move it but it's just messing up my game. Below is my code.
GameView Class:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class GameView
{
Pieces piece;
Players player;
/**
* Constructor for objects of class GameView
*/
public GameView()
{
gui();
}
/**
* Setting up the GUI. JFrame, Panels, setting the sizes, colour etc.
*/
public void gui()
{
//Initialising the object
BorderLayout borderlayout = new BorderLayout();
Players player = new Players();
Pieces piece = new Pieces();
//Creates the frame, set the visibility to true, sets the size and exit on close
JFrame frame = new JFrame("Games");
frame.setVisible(true);
frame.setSize(600,400);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Creates the menu bar and the content it holds
JMenuBar menubar = new JMenuBar();
frame.setJMenuBar(menubar);
JMenu selectGame = new JMenu("Select Game");
menubar.add(selectGame);
JMenuItem cGame = new JMenuItem("CGame");
JMenuItem mGame = new JMenuItem("MGame");
JMenuItem sGame = new JMenuItem("SGame");
selectGame.add(cGame);
selectGame.add(mGame);
selectGame.add(sGame);
//Copy From here//Get the Images for the game pieces from piece class
piece.pieceOne();
piece.pieceTwo();
//Creates the button using the loop, adds it into the panel and frame.
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(3,10));
JButton [] buttons = new JButton[30];
for(int i=0;i<30;i++){
buttons[i] = new JButton("" + i);
buttons[i].setBackground(Color.white);
//Puts the player 1 piece on button 1,3,5,7,9 and player 2 piece on button 2,4,6,8,10
if (i < 10) {
if (i%2 == 0) {
buttons[i].setIcon(piece.getPieceOne());
} else {
buttons[i].setIcon(piece.getPieceTwo());
}
}
panel.add(buttons[i]);
}
frame.add(panel, BorderLayout.CENTER);
//Creates the Throw stick button
Panel p = new Panel();
p.setLayout(new GridLayout());
final Dice dice = new Dice();
Button button = new Button("Throw Dice");
final Label label = new Label("Dice Draw");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dice.randomGenerator();
label.setText(Integer.toString(dice.getDiceResult()));
}
});
p.add(button);
p.add(label);
p.setBackground(new Color(156, 93, 82));
frame.add(p, BorderLayout.SOUTH);
//Creates the label which goes to the either side of the board, holds the player 1 and player 2 name.
Panel p2 = new Panel();
p2.setLayout(new BorderLayout());
JLabel player1Lbl = new JLabel("Player 1");
player.enterNameP1();
player1Lbl.setText(player.getPlayer1Name());
p2.add(player1Lbl, BorderLayout.WEST);
JLabel player2Lbl = new JLabel("Player 2");
player.enterNameP2();
player2Lbl.setText(player.getPlayer2Name());
p2.add(player2Lbl, BorderLayout.EAST);
p2.add(new Label("SENET GAME"), BorderLayout.NORTH );
p2.setBackground(new Color(156, 93, 82));
p2.setFont(new Font("sansserif", Font.BOLD, 18));
frame.add(p2);
//Additional settings to the frame and the panel
panel.setBackground(new Color(156, 93, 82));
panel.setLayout(new GridLayout(3,10));
panel.setSize(new Dimension(400, 200));
panel.setLocation((frame.getWidth()-panel.getWidth())/2, 80); ///Copy till here
frame.setBackground(new Color(156, 93, 82));
frame.setSize(new Dimension(600, 400));
frame.setResizable(false);
}
}
Below is the code I copied from GameView class which I need in Sview Class, How can i sort the variable frame when it is initialised in GameView?
SView Class:
Public SView()
{
//Get the Images for the game pieces from piece class
piece.pieceOne();
piece.pieceTwo();
//Creates the button using the loop, adds it into the panel and frame.
JPanel panel = new JPanel();
panel.setLayout(new GridLayout(3,10));
JButton [] buttons = new JButton[30];
for(int i=0;i<30;i++){
buttons[i] = new JButton("" + i);
buttons[i].setBackground(Color.white);
//Puts the player 1 piece on button 1,3,5,7,9 and player 2 piece on button 2,4,6,8,10
if (i < 10) {
if (i%2 == 0) {
buttons[i].setIcon(piece.getPieceOne());
} else {
buttons[i].setIcon(piece.getPieceTwo());
}
}
panel.add(buttons[i]);
}
frame.add(panel, BorderLayout.CENTER);
//Creates the Throw stick button
Panel p = new Panel();
p.setLayout(new GridLayout());
final Dice dice = new Dice();
Button button = new Button("Throw Dice");
final Label label = new Label("Dice Draw");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
dice.randomGenerator();
label.setText(Integer.toString(dice.getDiceResult()));
}
});
p.add(button);
p.add(label);
p.setBackground(new Color(156, 93, 82));
frame.add(p, BorderLayout.SOUTH);
//Creates the label which goes to the either side of the board, holds the player 1 and player 2 name.
Panel p2 = new Panel();
p2.setLayout(new BorderLayout());
JLabel player1Lbl = new JLabel("Player 1");
player.enterNameP1();
player1Lbl.setText(player.getPlayer1Name());
p2.add(player1Lbl, BorderLayout.WEST);
JLabel player2Lbl = new JLabel("Player 2");
player.enterNameP2();
player2Lbl.setText(player.getPlayer2Name());
p2.add(player2Lbl, BorderLayout.EAST);
p2.add(new Label("SGAME"), BorderLayout.NORTH );
p2.setBackground(new Color(156, 93, 82));
p2.setFont(new Font("sansserif", Font.BOLD, 18));
frame.add(p2);
//Additional settings to the frame and the panel
panel.setBackground(new Color(156, 93, 82));
panel.setLayout(new GridLayout(3,10));
panel.setSize(new Dimension(400, 200));
panel.setLocation((frame.getWidth()-panel.getWidth())/2, 80);
}
| 0 |
3,878,610 | 10/07/2010 04:13:56 | 349,528 | 05/25/2010 03:23:55 | 74 | 4 | Why keep code behind 'clean' and do everything in XAML? There is no benefit... | To avoid turning this into a discussion (not liked by StackOverflow) I ask you specifically: what is the benefit of keeping code behind clean? If you agree with me that it is overrated vote me up :)
Many a time I come across posts here about someone trying to do the equivalent in XAML instead of code behind their only reason being they want to keep their code behind 'clean'.. Correct me if I am wrong but is not the case that:
<oli>
<li>XAML is compiled too - into BAML - then at runtime has to be parsed into code anyway.</li>
<li>XAML can potentially have more runtime bugs as they will not be picked up by the compiler at compile time - from incorrect spellings - these bugs are also harder to debug.</li>
<li>There already is code behind - like it or not <pre><code>InitializeComponent();</code></pre> has to be run and the .g.i.cs file it is in contains a bunch of code though it may be hidden.</li>
</oli>
Is it not purely psychological? I suspect it is developers who come from a web background and like markup as opposed to code... | c# | .net | wpf | xaml | null | 10/07/2010 08:17:06 | not a real question | Why keep code behind 'clean' and do everything in XAML? There is no benefit...
===
To avoid turning this into a discussion (not liked by StackOverflow) I ask you specifically: what is the benefit of keeping code behind clean? If you agree with me that it is overrated vote me up :)
Many a time I come across posts here about someone trying to do the equivalent in XAML instead of code behind their only reason being they want to keep their code behind 'clean'.. Correct me if I am wrong but is not the case that:
<oli>
<li>XAML is compiled too - into BAML - then at runtime has to be parsed into code anyway.</li>
<li>XAML can potentially have more runtime bugs as they will not be picked up by the compiler at compile time - from incorrect spellings - these bugs are also harder to debug.</li>
<li>There already is code behind - like it or not <pre><code>InitializeComponent();</code></pre> has to be run and the .g.i.cs file it is in contains a bunch of code though it may be hidden.</li>
</oli>
Is it not purely psychological? I suspect it is developers who come from a web background and like markup as opposed to code... | 1 |
10,430,661 | 05/03/2012 11:43:20 | 1,302,933 | 03/30/2012 09:48:32 | 1 | 0 | MySQL Table of UK Area Codes and Names | I need database of Uk cities with their post codes. Any help is appreciated.
Thanks for your time. | php | sql | null | null | null | 05/03/2012 11:45:49 | not a real question | MySQL Table of UK Area Codes and Names
===
I need database of Uk cities with their post codes. Any help is appreciated.
Thanks for your time. | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.