PostId
int64 13
11.8M
| PostCreationDate
stringlengths 19
19
| OwnerUserId
int64 3
1.57M
| OwnerCreationDate
stringlengths 10
19
| ReputationAtPostCreation
int64 -33
210k
| OwnerUndeletedAnswerCountAtPostTime
int64 0
5.77k
| Title
stringlengths 10
250
| BodyMarkdown
stringlengths 12
30k
| Tag1
stringlengths 1
25
⌀ | Tag2
stringlengths 1
25
⌀ | Tag3
stringlengths 1
25
⌀ | Tag4
stringlengths 1
25
⌀ | Tag5
stringlengths 1
25
⌀ | PostClosedDate
stringlengths 19
19
⌀ | OpenStatus
stringclasses 5
values | unified_texts
stringlengths 47
30.1k
| OpenStatus_id
int64 0
4
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10,014,974 | 04/04/2012 16:03:32 | 731,278 | 04/29/2011 14:50:13 | 367 | 0 | Handling iPad touch events for draggables/droppables (undefined changedTouches) | I am trying to get jQuery drag/drop to work nicely with iPad touch events. I found this code on the internet:
function touchHandler(event)
{
var touches = event.changedTouches,
first = touches[0],
type = "";
switch (event.type)
{
case "touchstart": type = "mousedown"; break;
case "touchmove": type = "mousemove"; break;
case "touchend": type = "mouseup"; break;
default: return;
}
//initMouseEvent(type, canBubble, cancelable, view, clickCount,
// screenX, screenY, clientX, clientY, ctrlKey,
// altKey, shiftKey, metaKey, button, relatedTarget);
var simulatedEvent = document.createEvent("MouseEvent");
simulatedEvent.initMouseEvent(type, true, true, window, 1,
first.screenX, first.screenY,
first.clientX, first.clientY, false,
false, false, false, 0/*left*/, null);
first.target.dispatchEvent(simulatedEvent);
event.preventDefault();
}
It appears to work fine if I attach the touchHandler to the `document` touchstart/move/end, but then no native zooming/scrolling on the iPad is allowed, so I am trying to just attach this handler to the draggables themselves.
The issue that I am seeing with this is that `event.changeTouches` is always undefined for some reason, as you can witness in http://jsfiddle.net/myLj2/1/ . I can't come up with a reason why a touch event will always have an undefined `changeTouches` property and because of it, this code won't work. Any thoughts? | javascript | jquery | jquery-ui | touch-events | null | null | open | Handling iPad touch events for draggables/droppables (undefined changedTouches)
===
I am trying to get jQuery drag/drop to work nicely with iPad touch events. I found this code on the internet:
function touchHandler(event)
{
var touches = event.changedTouches,
first = touches[0],
type = "";
switch (event.type)
{
case "touchstart": type = "mousedown"; break;
case "touchmove": type = "mousemove"; break;
case "touchend": type = "mouseup"; break;
default: return;
}
//initMouseEvent(type, canBubble, cancelable, view, clickCount,
// screenX, screenY, clientX, clientY, ctrlKey,
// altKey, shiftKey, metaKey, button, relatedTarget);
var simulatedEvent = document.createEvent("MouseEvent");
simulatedEvent.initMouseEvent(type, true, true, window, 1,
first.screenX, first.screenY,
first.clientX, first.clientY, false,
false, false, false, 0/*left*/, null);
first.target.dispatchEvent(simulatedEvent);
event.preventDefault();
}
It appears to work fine if I attach the touchHandler to the `document` touchstart/move/end, but then no native zooming/scrolling on the iPad is allowed, so I am trying to just attach this handler to the draggables themselves.
The issue that I am seeing with this is that `event.changeTouches` is always undefined for some reason, as you can witness in http://jsfiddle.net/myLj2/1/ . I can't come up with a reason why a touch event will always have an undefined `changeTouches` property and because of it, this code won't work. Any thoughts? | 0 |
8,110,280 | 11/13/2011 07:34:33 | 434,051 | 10/22/2009 09:12:01 | 5,827 | 8 | Boost::geometry is it how to turn MultiPoint into Poligon with holes? | So We have o set of points. like this:
![enter image description here][1]
We want to get united poligon with holes (calculated as if each point was square or circle with some radius and that poligon would be untion of such points):
![enter image description here][2]
(shown in green)
As you see it is nor [Convex hull][3] nor [Concave Hull][4] its just area under points with given aeria to each point.
Is it possible to do such thing with boost geometry and how to do it with it?
[1]: http://i.stack.imgur.com/FPP4i.png
[2]: http://i.stack.imgur.com/kQmun.png
[3]: http://en.wikipedia.org/wiki/Convex_hull
[4]: http://gis.stackexchange.com/questions/1200/concave-hull-definition-algorithms-and-practical-solutions | c++ | boost | boost-geometry | null | null | 11/13/2011 07:50:02 | not constructive | Boost::geometry is it how to turn MultiPoint into Poligon with holes?
===
So We have o set of points. like this:
![enter image description here][1]
We want to get united poligon with holes (calculated as if each point was square or circle with some radius and that poligon would be untion of such points):
![enter image description here][2]
(shown in green)
As you see it is nor [Convex hull][3] nor [Concave Hull][4] its just area under points with given aeria to each point.
Is it possible to do such thing with boost geometry and how to do it with it?
[1]: http://i.stack.imgur.com/FPP4i.png
[2]: http://i.stack.imgur.com/kQmun.png
[3]: http://en.wikipedia.org/wiki/Convex_hull
[4]: http://gis.stackexchange.com/questions/1200/concave-hull-definition-algorithms-and-practical-solutions | 4 |
5,968,670 | 05/11/2011 18:11:03 | 396,133 | 07/19/2010 18:52:56 | 447 | 23 | sharing a link on facebook: how to get thumbnails? | I've put in my page's header the following
<link rel="image_src" href="http://fractalsoft.s3.amazonaws.com/sfondo.jp2" />
but the thumb is not showing up.
I think the problem is that the image is located outside the site.
Is there a way to solve this?
Thanks! | facebook | null | null | null | null | null | open | sharing a link on facebook: how to get thumbnails?
===
I've put in my page's header the following
<link rel="image_src" href="http://fractalsoft.s3.amazonaws.com/sfondo.jp2" />
but the thumb is not showing up.
I think the problem is that the image is located outside the site.
Is there a way to solve this?
Thanks! | 0 |
7,236,247 | 08/29/2011 21:33:08 | 918,597 | 08/29/2011 21:33:08 | 1 | 0 | IE Protected Mode for Local System Account | I have a Windows Service that runs a Team City Build agent on a Windows 7 OS.
This agent triggers NUnit tests which use the Selenium IE web drivers to execute a series of tests.
For the Selenium IE web drivers to work the protected mode for all zones needs to be set to the same value (either protected mode on or off).
The problem is the default settings for the Local System Account are invalid (some zones are running in protected mode, others are not).
Can anyone can tell me how to change the protected mode settings for either all users or the Local System Account user? | service | local | protected | mode | account | null | open | IE Protected Mode for Local System Account
===
I have a Windows Service that runs a Team City Build agent on a Windows 7 OS.
This agent triggers NUnit tests which use the Selenium IE web drivers to execute a series of tests.
For the Selenium IE web drivers to work the protected mode for all zones needs to be set to the same value (either protected mode on or off).
The problem is the default settings for the Local System Account are invalid (some zones are running in protected mode, others are not).
Can anyone can tell me how to change the protected mode settings for either all users or the Local System Account user? | 0 |
9,981,903 | 04/02/2012 18:37:37 | 325,016 | 04/24/2010 17:25:09 | 654 | 10 | Deferred Lighting in 2D, how to add the light effects together | I am currently using
glBlendFunc(GL_ONE, GL_ONE);
but its not giving the desired effect. When one light is drawn on top of another, their effects are not added together around the edges. Instead, the darker light may cause the brighter lighted area to become darker!
How do I solve this problem?
![Lighting Artifacts][1]
[1]: http://i.stack.imgur.com/gmQh9.png | c++ | opengl | shader | null | null | null | open | Deferred Lighting in 2D, how to add the light effects together
===
I am currently using
glBlendFunc(GL_ONE, GL_ONE);
but its not giving the desired effect. When one light is drawn on top of another, their effects are not added together around the edges. Instead, the darker light may cause the brighter lighted area to become darker!
How do I solve this problem?
![Lighting Artifacts][1]
[1]: http://i.stack.imgur.com/gmQh9.png | 0 |
7,314,762 | 09/06/2011 03:57:49 | 929,896 | 09/06/2011 03:57:49 | 1 | 0 | How to create dynamic domain name something like weebly.com | Hi I dont know if my question makes sense but I am creating aa website which has subdomain features. I need help or a guide for how to ask user to buy a domain and then host it on my server and have my templates deployed onto their domain. I also want to know whether this thing can be achieved by modrewrite or I will have to create a new domain in the apache for the same I cant explain better then this I am trying to achieve something what weebly is doing where they host www.xyz.com on their servers.
I just want to know where to look for same as I am hitting blind targets since I cant find what I am searching for Hence I am posting it here thank you for your help will really appreciate. | php | apache | null | null | null | 09/06/2011 08:31:51 | not a real question | How to create dynamic domain name something like weebly.com
===
Hi I dont know if my question makes sense but I am creating aa website which has subdomain features. I need help or a guide for how to ask user to buy a domain and then host it on my server and have my templates deployed onto their domain. I also want to know whether this thing can be achieved by modrewrite or I will have to create a new domain in the apache for the same I cant explain better then this I am trying to achieve something what weebly is doing where they host www.xyz.com on their servers.
I just want to know where to look for same as I am hitting blind targets since I cant find what I am searching for Hence I am posting it here thank you for your help will really appreciate. | 1 |
10,500,884 | 05/08/2012 14:43:50 | 1,382,330 | 05/08/2012 14:27:28 | 1 | 0 | Python: get or set value in dictionary by pointer of key | who i can set value in dic by reference
def set(point):
point=0
dic={'pointer':22}
set(dic['pointer'])
print dic # {'pointer': 0}
i must send one argument | python | pointers | dictionary | reference | null | 05/08/2012 15:46:02 | not a real question | Python: get or set value in dictionary by pointer of key
===
who i can set value in dic by reference
def set(point):
point=0
dic={'pointer':22}
set(dic['pointer'])
print dic # {'pointer': 0}
i must send one argument | 1 |
7,222,010 | 08/28/2011 15:56:44 | 637,142 | 02/28/2011 04:31:33 | 873 | 38 | see how many routers are outside my network | In my office there is a main router A that gives internet to router X and router Y. My router happens to be router X.
If I did not knew this, how would I be able to tell that my router is connected to router A? or if I connect yet another router to my router x and connect a computer to that router how can I be able to know that that router has to connect to router x then to router A in order to get internet?
also I know how to get my local ip:
![enter image description here][1]
so everytime I want to access a shared folder on that nework I will type \\192.168.0.120 and if I want to connect to my router I will open a browser and goto: 192.168.0.1.
but this window does not tell me nothing about router A for example.
Also I use do have a little method that always returned me 192.168.0.120 (before the addition of new routers on my office)
public string GetLocalIP()
{
IPHostEntry host;
string localIP = "";
host = Dns.GetHostEntry(Dns.GetHostName());
foreach (IPAddress ip in host.AddressList)
{
if (ip.AddressFamily.ToString() == "InterNetwork")
{
localIP = ip.ToString();
}
}
return localIP;
}
and when they added the new router A now it returns: "192.168.184.1" and when I type \\192.168.184.1 on my local computer it takes me to:
![enter image description here][2]
but I am not able to see those contents when I type that same path in a different computer. In other words I am able to see the shared docs when typing \\192.168.0.120 and NOT \\192.168.184.1 on a different computer connected to the same network.
also when I type ipconfig I don't get any info about router A:
![enter image description here][3]
[1]: http://i.stack.imgur.com/e1eub.png
[2]: http://i.stack.imgur.com/slUK5.png
[3]: http://i.stack.imgur.com/ykqmR.png | c# | networking | ip | null | null | 08/28/2011 16:26:14 | not a real question | see how many routers are outside my network
===
In my office there is a main router A that gives internet to router X and router Y. My router happens to be router X.
If I did not knew this, how would I be able to tell that my router is connected to router A? or if I connect yet another router to my router x and connect a computer to that router how can I be able to know that that router has to connect to router x then to router A in order to get internet?
also I know how to get my local ip:
![enter image description here][1]
so everytime I want to access a shared folder on that nework I will type \\192.168.0.120 and if I want to connect to my router I will open a browser and goto: 192.168.0.1.
but this window does not tell me nothing about router A for example.
Also I use do have a little method that always returned me 192.168.0.120 (before the addition of new routers on my office)
public string GetLocalIP()
{
IPHostEntry host;
string localIP = "";
host = Dns.GetHostEntry(Dns.GetHostName());
foreach (IPAddress ip in host.AddressList)
{
if (ip.AddressFamily.ToString() == "InterNetwork")
{
localIP = ip.ToString();
}
}
return localIP;
}
and when they added the new router A now it returns: "192.168.184.1" and when I type \\192.168.184.1 on my local computer it takes me to:
![enter image description here][2]
but I am not able to see those contents when I type that same path in a different computer. In other words I am able to see the shared docs when typing \\192.168.0.120 and NOT \\192.168.184.1 on a different computer connected to the same network.
also when I type ipconfig I don't get any info about router A:
![enter image description here][3]
[1]: http://i.stack.imgur.com/e1eub.png
[2]: http://i.stack.imgur.com/slUK5.png
[3]: http://i.stack.imgur.com/ykqmR.png | 1 |
7,129,213 | 08/20/2011 02:22:09 | 43,118 | 12/04/2008 06:57:07 | 1,468 | 27 | R .libPaths() difference between RStudio and command-line R | When I run R from the command line:
> library(ggplot2)
...
> path.package('ggplot2')
[1] "/home/yang/R/x86_64-pc-linux-gnu-library/2.13/ggplot2"
> .libPaths()
[1] "/home/yang/R/x86_64-pc-linux-gnu-library/2.13"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"
> Sys.getenv('R_LIBS_USER')
[1] "~/R/x86_64-pc-linux-gnu-library/2.13"
(Note: that environment variable actually doesn't exist when I check from my shell.)
But from RStudio Server running on the same box, and after logging in as the same user:
> path.package('ggplot2')
[1] "/home/yang/R/library/ggplot2"
> .libPaths()
[1] "/home/yang/R/library" "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library" "/usr/lib/R/library"
[5] "/usr/lib/rstudio-server/R/library"
> Sys.getenv('R_LIBS_USER')
[1] "/home/yang/R/library"
Can you explain why these are different by default? Is this an RStudio customization? (Why?) Thanks in advance. | r | rstudio | null | null | null | null | open | R .libPaths() difference between RStudio and command-line R
===
When I run R from the command line:
> library(ggplot2)
...
> path.package('ggplot2')
[1] "/home/yang/R/x86_64-pc-linux-gnu-library/2.13/ggplot2"
> .libPaths()
[1] "/home/yang/R/x86_64-pc-linux-gnu-library/2.13"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"
> Sys.getenv('R_LIBS_USER')
[1] "~/R/x86_64-pc-linux-gnu-library/2.13"
(Note: that environment variable actually doesn't exist when I check from my shell.)
But from RStudio Server running on the same box, and after logging in as the same user:
> path.package('ggplot2')
[1] "/home/yang/R/library/ggplot2"
> .libPaths()
[1] "/home/yang/R/library" "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library" "/usr/lib/R/library"
[5] "/usr/lib/rstudio-server/R/library"
> Sys.getenv('R_LIBS_USER')
[1] "/home/yang/R/library"
Can you explain why these are different by default? Is this an RStudio customization? (Why?) Thanks in advance. | 0 |
10,322,687 | 04/25/2012 19:46:54 | 673,167 | 03/23/2011 14:03:25 | 17 | 0 | Access form fields inside controller's method | I'm starting to develop a small application in Ruby On Rails. I have a short form (within a view) in which the number of fields is variable and created with the code snippet below:
<% for item in @event.items %>
<tr>
<td><%= item.name %></td>
<td><input type="number" name="quantity" /></td>
</tr>
<% end %>
I want to after click 'submit', run a controller's method that access to the data included in each of the fields in the form and perform insertions on the database. In the end, I want the page to be refreshed.
How do I customize the action of the submit button to perform a controller's function? And how do I access inside this function to the form fields (whose number is variable as mentioned).
Thanks in advance for your help. | ruby-on-rails | ruby-on-rails-3 | ruby-on-rails-3.1 | null | null | null | open | Access form fields inside controller's method
===
I'm starting to develop a small application in Ruby On Rails. I have a short form (within a view) in which the number of fields is variable and created with the code snippet below:
<% for item in @event.items %>
<tr>
<td><%= item.name %></td>
<td><input type="number" name="quantity" /></td>
</tr>
<% end %>
I want to after click 'submit', run a controller's method that access to the data included in each of the fields in the form and perform insertions on the database. In the end, I want the page to be refreshed.
How do I customize the action of the submit button to perform a controller's function? And how do I access inside this function to the form fields (whose number is variable as mentioned).
Thanks in advance for your help. | 0 |
10,466,494 | 05/05/2012 22:25:01 | 1,349,600 | 04/22/2012 13:59:56 | 1 | 0 | PIL is not working on ubuntu 11.04 | My PIL module is not working on ubuntu 11.04.Can you please help me, how can i be able to make it work, as i want to read images and create thumbnails of an image using python in ubuntu 11.04 | python | null | null | null | null | 06/19/2012 11:42:00 | not a real question | PIL is not working on ubuntu 11.04
===
My PIL module is not working on ubuntu 11.04.Can you please help me, how can i be able to make it work, as i want to read images and create thumbnails of an image using python in ubuntu 11.04 | 1 |
9,869,696 | 03/26/2012 09:31:43 | 1,292,617 | 03/26/2012 09:22:08 | 1 | 0 | Regex required: It should contains alphanumeric and special characters | The accepted values may contains:
- Alphabets
- Numeric values
- Alphanumeric
- combination of alphanumric and special characters
- E-mail Address
- url
but not **only special character like "#$%@&*($"** | php | null | null | null | null | 06/03/2012 19:52:34 | not a real question | Regex required: It should contains alphanumeric and special characters
===
The accepted values may contains:
- Alphabets
- Numeric values
- Alphanumeric
- combination of alphanumric and special characters
- E-mail Address
- url
but not **only special character like "#$%@&*($"** | 1 |
8,036,363 | 11/07/2011 12:16:21 | 1,033,703 | 11/07/2011 12:11:36 | 1 | 0 | Real Time Data Warehousing | I am writing my dissertation on the topic of "Business Intelligence via Real Time Data Warehousing". I am almost done with my literature review part. Now i need to prepare a questionnaire for warehousing people to check how the installation of RTDW helped them in decision making and improving Business intelligence. Can anyone help suggest me some ideas about the type of questions i put into the questionnaire.I will be vry thankful ..thnx | data | time | data-warehouse | real | null | 11/29/2011 05:31:23 | not constructive | Real Time Data Warehousing
===
I am writing my dissertation on the topic of "Business Intelligence via Real Time Data Warehousing". I am almost done with my literature review part. Now i need to prepare a questionnaire for warehousing people to check how the installation of RTDW helped them in decision making and improving Business intelligence. Can anyone help suggest me some ideas about the type of questions i put into the questionnaire.I will be vry thankful ..thnx | 4 |
8,336,598 | 12/01/2011 04:39:41 | 625,540 | 02/20/2011 19:02:35 | 21 | 5 | What's this Java code doing? | I know C/C++/C#/ActionScript/PHP and have worked in all of them. As per my Knowledge we generally initialize object as
Object obj = new Object();
Java does the same most of the times but yesterday while working with Netbeans and JTable swing control, IDE generated this code which kind of looks a bit strange to me. Any explanation of how is it initializing an object? What's the {..} part after new DefaultTableModel(..)?
_model = new DefaultTableModel(
new Object [][] {
},
new String [] {
"Id", "Project Title", "Start Date", "Deadline", "Description", "PercentDone"
}
){
Class[] types = new Class [] {
java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
};
boolean[] canEdit = new boolean [] {
false, false, false, false, false, false
};
@Override
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
};
| java | swing | netbeans | null | null | 02/18/2012 02:17:14 | too localized | What's this Java code doing?
===
I know C/C++/C#/ActionScript/PHP and have worked in all of them. As per my Knowledge we generally initialize object as
Object obj = new Object();
Java does the same most of the times but yesterday while working with Netbeans and JTable swing control, IDE generated this code which kind of looks a bit strange to me. Any explanation of how is it initializing an object? What's the {..} part after new DefaultTableModel(..)?
_model = new DefaultTableModel(
new Object [][] {
},
new String [] {
"Id", "Project Title", "Start Date", "Deadline", "Description", "PercentDone"
}
){
Class[] types = new Class [] {
java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
};
boolean[] canEdit = new boolean [] {
false, false, false, false, false, false
};
@Override
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
};
| 3 |
4,842,268 | 01/30/2011 10:01:59 | 595,675 | 01/30/2011 10:01:59 | 1 | 0 | implemeting datastructues in java | During my college days i used to do programming about datastructures like trees, linked list, bst, b tree in C/C++.But after my collges days i am working on java for last 2 years, and have never used those datastructues.I dont have any clues about how can i implement tress,bst,b tree in java .Can any one give me some clues on about how to implement trivial datastructues in java? i know that java have lots of inbuilt this in form of collections.I want to implement bst, linked list ,trees, in java | java | data-structures | tree | null | null | 01/30/2011 11:04:33 | not constructive | implemeting datastructues in java
===
During my college days i used to do programming about datastructures like trees, linked list, bst, b tree in C/C++.But after my collges days i am working on java for last 2 years, and have never used those datastructues.I dont have any clues about how can i implement tress,bst,b tree in java .Can any one give me some clues on about how to implement trivial datastructues in java? i know that java have lots of inbuilt this in form of collections.I want to implement bst, linked list ,trees, in java | 4 |
6,718,662 | 07/16/2011 16:17:28 | 237,681 | 12/23/2009 15:31:25 | 1,815 | 26 | Books or/and tutorials for android programming for PHP developer | I am PHP developer and I would like to start programming simple apps for my android smart phone. Any good suggestions on tutorials or books for PHP developer? | php | android | null | null | null | 07/17/2011 12:00:01 | off topic | Books or/and tutorials for android programming for PHP developer
===
I am PHP developer and I would like to start programming simple apps for my android smart phone. Any good suggestions on tutorials or books for PHP developer? | 2 |
7,462,491 | 09/18/2011 15:34:53 | 123,367 | 06/15/2009 21:18:09 | 101 | 9 | Programming Shells in unix | I am new to UNIX pipe communication and in need of some help here understanding this. I need to create pipes and fork off child process that communicate with the parent process via these pipes. My questions are
a) Why a pipe per child process?
b) What are file descriptors really, and do I need to create one per pipe?
c) What do the StdIn and StdOut to do with all this? | c++ | c | unix | ubuntu | null | 09/18/2011 16:05:54 | not a real question | Programming Shells in unix
===
I am new to UNIX pipe communication and in need of some help here understanding this. I need to create pipes and fork off child process that communicate with the parent process via these pipes. My questions are
a) Why a pipe per child process?
b) What are file descriptors really, and do I need to create one per pipe?
c) What do the StdIn and StdOut to do with all this? | 1 |
9,556,476 | 03/04/2012 16:08:27 | 1,248,294 | 03/04/2012 16:03:05 | 1 | 0 | associating a custom file extension with java app in windows | I would like to "link" few file extensions to my java application under windows. When user double clicks file with "linked" extension, I would like to open my app and I need to know path to file that launched app.
Regards,
Dario | java | windows | file | extension | null | 03/06/2012 13:42:55 | not a real question | associating a custom file extension with java app in windows
===
I would like to "link" few file extensions to my java application under windows. When user double clicks file with "linked" extension, I would like to open my app and I need to know path to file that launched app.
Regards,
Dario | 1 |
4,324,498 | 12/01/2010 12:47:29 | 365,867 | 08/30/2009 00:01:09 | 101 | 12 | what is the advantage and disadvantage of the programming languages that you know? | A lot of times we hear questions like :
-which is better programming language A or B?
-what programming language should i learn ?
i came to the conclusion that those questions are "wrong" questions because the choice of programming language is governed by many factors including but not limited to the type of job on hand / your programming experience / targeted platforms ....etc.so the choice of programming language should be tailored to the job.
therefore , the correct question would be :
of all the programming languages you know , tell us :
1-advantages
2-disadvantages
3-the type /domain of applications in which that language is best suited to and why it is.
4- any other comments
if you know more than one language it is also very useful to give some comparison.
by sharing your experience with novice programmers who want to jump into the programming world you will help them to make informed decisions.
| languages | choice | null | null | null | 12/02/2010 03:54:05 | not constructive | what is the advantage and disadvantage of the programming languages that you know?
===
A lot of times we hear questions like :
-which is better programming language A or B?
-what programming language should i learn ?
i came to the conclusion that those questions are "wrong" questions because the choice of programming language is governed by many factors including but not limited to the type of job on hand / your programming experience / targeted platforms ....etc.so the choice of programming language should be tailored to the job.
therefore , the correct question would be :
of all the programming languages you know , tell us :
1-advantages
2-disadvantages
3-the type /domain of applications in which that language is best suited to and why it is.
4- any other comments
if you know more than one language it is also very useful to give some comparison.
by sharing your experience with novice programmers who want to jump into the programming world you will help them to make informed decisions.
| 4 |
9,898,186 | 03/27/2012 21:44:43 | 970,272 | 09/29/2011 02:20:22 | 1 | 0 | How can I check whether the device is connected to a Power supply, USB or to a Dock | I'm developing an application in which I want to check like to which power source my device is connected to? I know it is possible by some way but I couldn't figure it out. Thanks for helping. | android | null | null | null | null | null | open | How can I check whether the device is connected to a Power supply, USB or to a Dock
===
I'm developing an application in which I want to check like to which power source my device is connected to? I know it is possible by some way but I couldn't figure it out. Thanks for helping. | 0 |
11,653,893 | 07/25/2012 16:02:01 | 1,376,561 | 05/05/2012 09:40:35 | 10 | 0 | KVO willChangeValueForKey and didChangeValueForKey | I have just a simple question :x
willChangeValueForKey and didChangeValueForKey is equal setValue:forObject: ?
Thx you | objective-c | key-value-observing | null | null | null | 07/25/2012 19:00:53 | not a real question | KVO willChangeValueForKey and didChangeValueForKey
===
I have just a simple question :x
willChangeValueForKey and didChangeValueForKey is equal setValue:forObject: ?
Thx you | 1 |
1,811,982 | 11/28/2009 08:26:58 | 220,395 | 11/28/2009 08:22:27 | 1 | 0 | Stanford Parse -Help me find the manual | Would any one help me by sending the Stanford dependency manual.... | stanford-nlp | null | null | null | null | null | open | Stanford Parse -Help me find the manual
===
Would any one help me by sending the Stanford dependency manual.... | 0 |
8,604,738 | 12/22/2011 13:43:33 | 1,111,755 | 12/22/2011 12:58:55 | 1 | 0 | Windows Phone client for site | I want to write a client for a site on windows phone 7 but the site has no API. The client should simply take data from a website and display of a suitable form. What can I use to write such a client | c# | windows-phone-7 | null | null | null | 12/22/2011 14:22:55 | not a real question | Windows Phone client for site
===
I want to write a client for a site on windows phone 7 but the site has no API. The client should simply take data from a website and display of a suitable form. What can I use to write such a client | 1 |
3,192,052 | 07/07/2010 05:06:44 | 232,574 | 12/16/2009 01:37:31 | 167 | 7 | Critique my concurrent queue | This is a concurrent queue I wrote which I plan on using in a thread pool I'm writing. `atomic_counter` is pasted below if you're curious!
#ifndef NS_CONCURRENT_QUEUE_HPP_INCLUDED
#define NS_CONCURRENT_QUEUE_HPP_INCLUDED
#include <ns/atomic_counter.hpp>
#include <boost/noncopyable.hpp>
#include <boost/smart_ptr/detail/spinlock.hpp>
#include <cassert>
#include <cstddef>
namespace ns {
template<typename T,
typename mutex_type = boost::detail::spinlock,
typename scoped_lock_type = typename mutex_type::scoped_lock>
class concurrent_queue : boost::noncopyable {
struct node {
node * link;
T const value;
explicit node(T const & source) : link(0), value(source) { }
};
node * m_front;
node * m_back;
atomic_counter m_counter;
mutex_type m_mutex;
public:
// types
typedef T value_type;
// construction
concurrent_queue() : m_front(0), m_mutex() { }
~concurrent_queue() { clear(); }
// capacity
std::size_t size() const { return m_counter; }
bool empty() const { return (m_counter == 0); }
// modifiers
void push(T const & source);
bool try_pop(T & destination);
void clear();
};
template<typename T, typename mutex_type, typename scoped_lock_type>
void concurrent_queue<T, mutex_type, scoped_lock_type>::push(T const & source) {
node * hold = new node(source);
scoped_lock_type lock(m_mutex);
if (empty())
m_front = hold;
else
m_back->link = hold;
m_back = hold;
++m_counter;
}
template<typename T, typename mutex_type, typename scoped_lock_type>
bool concurrent_queue<T, mutex_type, scoped_lock_type>::try_pop(T & destination) {
node const * hold;
{
scoped_lock_type lock(m_mutex);
if (empty())
return false;
hold = m_front;
if (m_front == m_back)
m_front = m_back = 0;
else
m_front = m_front->link;
--m_counter;
}
destination = hold->value;
delete hold;
return true;
}
template<typename T, typename mutex_type, typename scoped_lock_type>
void concurrent_queue<T, mutex_type, scoped_lock_type>::clear() {
node * hold;
{
scoped_lock_type lock(m_mutex);
hold = m_front;
m_front = 0;
m_back = 0;
m_counter = 0;
}
if (hold == 0)
return;
node * it;
while (hold != 0) {
it = hold;
hold = hold->link;
delete it;
}
}
}
#endif
atomic_counter.hpp
#ifndef NS_ATOMIC_COUNTER_HPP_INCLUDED
#define NS_ATOMIC_COUNTER_HPP_INCLUDED
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/noncopyable.hpp>
namespace ns {
class atomic_counter : boost::noncopyable {
volatile boost::uint32_t m_count;
public:
explicit atomic_counter(boost::uint32_t value = 0) : m_count(value) { }
operator boost::uint32_t() const {
return boost::interprocess::detail::atomic_read32(const_cast<volatile boost::uint32_t *>(&m_count));
}
void operator=(boost::uint32_t value) {
boost::interprocess::detail::atomic_write32(&m_count, value);
}
void operator++() {
boost::interprocess::detail::atomic_inc32(&m_count);
}
void operator--() {
boost::interprocess::detail::atomic_dec32(&m_count);
}
};
}
#endif | c++ | queue | concurrency | critique | null | 07/09/2010 00:15:40 | not a real question | Critique my concurrent queue
===
This is a concurrent queue I wrote which I plan on using in a thread pool I'm writing. `atomic_counter` is pasted below if you're curious!
#ifndef NS_CONCURRENT_QUEUE_HPP_INCLUDED
#define NS_CONCURRENT_QUEUE_HPP_INCLUDED
#include <ns/atomic_counter.hpp>
#include <boost/noncopyable.hpp>
#include <boost/smart_ptr/detail/spinlock.hpp>
#include <cassert>
#include <cstddef>
namespace ns {
template<typename T,
typename mutex_type = boost::detail::spinlock,
typename scoped_lock_type = typename mutex_type::scoped_lock>
class concurrent_queue : boost::noncopyable {
struct node {
node * link;
T const value;
explicit node(T const & source) : link(0), value(source) { }
};
node * m_front;
node * m_back;
atomic_counter m_counter;
mutex_type m_mutex;
public:
// types
typedef T value_type;
// construction
concurrent_queue() : m_front(0), m_mutex() { }
~concurrent_queue() { clear(); }
// capacity
std::size_t size() const { return m_counter; }
bool empty() const { return (m_counter == 0); }
// modifiers
void push(T const & source);
bool try_pop(T & destination);
void clear();
};
template<typename T, typename mutex_type, typename scoped_lock_type>
void concurrent_queue<T, mutex_type, scoped_lock_type>::push(T const & source) {
node * hold = new node(source);
scoped_lock_type lock(m_mutex);
if (empty())
m_front = hold;
else
m_back->link = hold;
m_back = hold;
++m_counter;
}
template<typename T, typename mutex_type, typename scoped_lock_type>
bool concurrent_queue<T, mutex_type, scoped_lock_type>::try_pop(T & destination) {
node const * hold;
{
scoped_lock_type lock(m_mutex);
if (empty())
return false;
hold = m_front;
if (m_front == m_back)
m_front = m_back = 0;
else
m_front = m_front->link;
--m_counter;
}
destination = hold->value;
delete hold;
return true;
}
template<typename T, typename mutex_type, typename scoped_lock_type>
void concurrent_queue<T, mutex_type, scoped_lock_type>::clear() {
node * hold;
{
scoped_lock_type lock(m_mutex);
hold = m_front;
m_front = 0;
m_back = 0;
m_counter = 0;
}
if (hold == 0)
return;
node * it;
while (hold != 0) {
it = hold;
hold = hold->link;
delete it;
}
}
}
#endif
atomic_counter.hpp
#ifndef NS_ATOMIC_COUNTER_HPP_INCLUDED
#define NS_ATOMIC_COUNTER_HPP_INCLUDED
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/noncopyable.hpp>
namespace ns {
class atomic_counter : boost::noncopyable {
volatile boost::uint32_t m_count;
public:
explicit atomic_counter(boost::uint32_t value = 0) : m_count(value) { }
operator boost::uint32_t() const {
return boost::interprocess::detail::atomic_read32(const_cast<volatile boost::uint32_t *>(&m_count));
}
void operator=(boost::uint32_t value) {
boost::interprocess::detail::atomic_write32(&m_count, value);
}
void operator++() {
boost::interprocess::detail::atomic_inc32(&m_count);
}
void operator--() {
boost::interprocess::detail::atomic_dec32(&m_count);
}
};
}
#endif | 1 |
1,613,772 | 10/23/2009 14:17:08 | 161,525 | 08/23/2009 10:09:43 | 80 | 14 | Accessing Facebook Connect FBML cookie via PyFacebook? | Is it possible, having logged in via a Facebook Connect FBML button, to retrieve and use the session details via [PyFacebook][1]? Can i use auth.getSession() in the same way as if I'd fired the login via Python?
Basically I'm trying to work out if it's possible to replace the stages up to and including raw_input() in the example below:
import facebook
API_KEY = 'xxx'
SECRET_KEY = 'xxx'
facebook = facebook.Facebook(API_KEY, SECRET_KEY)
facebook.auth.createToken()
facebook.login()
# Login to the window, then press enter
print 'After logging in, press enter...'
raw_input()
# This is where FBML button should get me
facebook.auth.getSession()
print 'Session Key: ', facebook.session_key
print 'Your UID: ', facebook.uid
[1]: http://github.com/sciyoshi/pyfacebook/ | fbml | facebook | python | cookies | null | null | open | Accessing Facebook Connect FBML cookie via PyFacebook?
===
Is it possible, having logged in via a Facebook Connect FBML button, to retrieve and use the session details via [PyFacebook][1]? Can i use auth.getSession() in the same way as if I'd fired the login via Python?
Basically I'm trying to work out if it's possible to replace the stages up to and including raw_input() in the example below:
import facebook
API_KEY = 'xxx'
SECRET_KEY = 'xxx'
facebook = facebook.Facebook(API_KEY, SECRET_KEY)
facebook.auth.createToken()
facebook.login()
# Login to the window, then press enter
print 'After logging in, press enter...'
raw_input()
# This is where FBML button should get me
facebook.auth.getSession()
print 'Session Key: ', facebook.session_key
print 'Your UID: ', facebook.uid
[1]: http://github.com/sciyoshi/pyfacebook/ | 0 |
624,857 | 03/09/2009 02:47:54 | 43,118 | 12/04/2008 06:57:07 | 91 | 0 | Finding which process was killed by Linux OOM killer | When Linux runs out of memory (OOM), the OOM killer chooses a process to kill based on some heuristics (it's an interesting read: <http://lwn.net/Articles/317814/>). How do I find out which processes were recently killed by the OOM killer? | linux | null | null | null | null | 07/15/2012 13:38:38 | off topic | Finding which process was killed by Linux OOM killer
===
When Linux runs out of memory (OOM), the OOM killer chooses a process to kill based on some heuristics (it's an interesting read: <http://lwn.net/Articles/317814/>). How do I find out which processes were recently killed by the OOM killer? | 2 |
7,473,759 | 09/19/2011 15:54:55 | 953,026 | 09/19/2011 15:54:55 | 1 | 0 | Internet Explorer unsupported get request | i got a big problem in IE (only IE, FF etc works great).
I got a canvas page: xyz.de/gewinnspiel.php?register=1.
In IE i get the following error:
> FacebookApiException: Unsupported get request. in Facebook->_graph()
Does anybody have an idea?
Thanks!
Kilian | facebook | internet-explorer | canvas | get | null | null | open | Internet Explorer unsupported get request
===
i got a big problem in IE (only IE, FF etc works great).
I got a canvas page: xyz.de/gewinnspiel.php?register=1.
In IE i get the following error:
> FacebookApiException: Unsupported get request. in Facebook->_graph()
Does anybody have an idea?
Thanks!
Kilian | 0 |
4,723,513 | 01/18/2011 11:28:02 | 69,882 | 02/23/2009 13:38:50 | 477 | 16 | How to correctly work with mailing lists? | Mailing lists are preffered communication channel for many open source products. But what is the best ways to interact with mailing lists? Currently i just receive a digest 2-3 times a day to my gmail account. This is not very good since i can't see tree-view structure of discussion and can't answer specific discussion branches. Alse, it's hard to maintain any notifications. For example, python mailing list emerges over 100 messages per day that are all packed into a few digest. If i'm interested only in 1-2 discussions taking place, it's no way for me to be notified about new messages in this discussions - i need to manually check every digest / e-mail and guess who answers what message and what is a discussion structure.
Maybe it's some desktop / web apps exists that allows to work with mailing list as with a standard tree-iew forum structure with notifications etc? Or is it some arcane methodology that provides an easy way to work with them? I feel myself terribly ineffictive with mailing lists right now :( | mailing-list | null | null | null | null | 01/18/2011 12:44:56 | off topic | How to correctly work with mailing lists?
===
Mailing lists are preffered communication channel for many open source products. But what is the best ways to interact with mailing lists? Currently i just receive a digest 2-3 times a day to my gmail account. This is not very good since i can't see tree-view structure of discussion and can't answer specific discussion branches. Alse, it's hard to maintain any notifications. For example, python mailing list emerges over 100 messages per day that are all packed into a few digest. If i'm interested only in 1-2 discussions taking place, it's no way for me to be notified about new messages in this discussions - i need to manually check every digest / e-mail and guess who answers what message and what is a discussion structure.
Maybe it's some desktop / web apps exists that allows to work with mailing list as with a standard tree-iew forum structure with notifications etc? Or is it some arcane methodology that provides an easy way to work with them? I feel myself terribly ineffictive with mailing lists right now :( | 2 |
6,258,514 | 06/06/2011 21:59:35 | 341,583 | 05/14/2010 20:20:19 | 2,056 | 53 | Search a relation without a second query | My question is about how to perform varying levels of search into a database while limiting the number of queries.
Let's start simple:
@companies = Company.where("active = ?", true)
Let's say we display records from this set. Then, we need:
@clientcompanies = @companies.where("client_id = ?", @client.id)
We display something from @clientcompanies. Then, we want to drill down further.
@searchcompanies = @clientcompanies.where("name LIKE ? OR notes LIKE ?", "#{params[:search]}%", "#{params[:search]}%")
Are these three statements the most efficient way to go about this?
If indeed the database is starting with the entire Company table each time around, is there a way to limit the scope so each of the above statements would take a shorter amount of time as the size of the set diminishes?
In case it matters, I'm running Rails 3 on both MySQL and PostgreSQL. | ruby-on-rails | performance | ruby-on-rails-3 | query | null | null | open | Search a relation without a second query
===
My question is about how to perform varying levels of search into a database while limiting the number of queries.
Let's start simple:
@companies = Company.where("active = ?", true)
Let's say we display records from this set. Then, we need:
@clientcompanies = @companies.where("client_id = ?", @client.id)
We display something from @clientcompanies. Then, we want to drill down further.
@searchcompanies = @clientcompanies.where("name LIKE ? OR notes LIKE ?", "#{params[:search]}%", "#{params[:search]}%")
Are these three statements the most efficient way to go about this?
If indeed the database is starting with the entire Company table each time around, is there a way to limit the scope so each of the above statements would take a shorter amount of time as the size of the set diminishes?
In case it matters, I'm running Rails 3 on both MySQL and PostgreSQL. | 0 |
10,036,997 | 04/05/2012 22:39:32 | 439,667 | 09/04/2010 15:25:29 | 164 | 6 | Density estimation and computer vision | I haven't taken any course on computer vision what so ever, and i have some basic questions i really need answers to.
1. When we talk about density, what do mean, what is density, and is it the same as p.d.f. ?
2. how could densities be used in classification, clustering, segmentation ?
3. how does it relate to probability theory ?
and further questions may rise from discussion, Thanks for all help. | computer-vision | probability | density | null | null | 05/06/2012 18:52:45 | off topic | Density estimation and computer vision
===
I haven't taken any course on computer vision what so ever, and i have some basic questions i really need answers to.
1. When we talk about density, what do mean, what is density, and is it the same as p.d.f. ?
2. how could densities be used in classification, clustering, segmentation ?
3. how does it relate to probability theory ?
and further questions may rise from discussion, Thanks for all help. | 2 |
10,630,515 | 05/17/2012 05:50:06 | 960,567 | 09/23/2011 06:57:46 | 993 | 9 | Whether it is fine to use class name like UserCreate or CreateUser? | I need to use a class name of one application. I need to ask whether I can use a class name like UserCreate or CreateUser. | c# | java | null | null | null | 05/17/2012 11:07:28 | not a real question | Whether it is fine to use class name like UserCreate or CreateUser?
===
I need to use a class name of one application. I need to ask whether I can use a class name like UserCreate or CreateUser. | 1 |
10,020,475 | 04/04/2012 23:00:57 | 773,578 | 05/27/2011 18:23:23 | 158 | 0 | Correct naming convention for C library code | What is the correct way to name files and methods that are part of a C based code library/API? | c | source-code | standards | null | null | 04/04/2012 23:17:43 | not a real question | Correct naming convention for C library code
===
What is the correct way to name files and methods that are part of a C based code library/API? | 1 |
5,824,929 | 04/28/2011 20:58:00 | 36,475 | 11/11/2008 08:29:59 | 78 | 3 | nHibernate 3 QueryOver with compound from clause | Does anybody know a way to do compound from clauses - that are possible with Linq to objects - with nHibernate 3 QueryOver syntax. I know its possible with Linq To nHibernate, but I'm still trying to get my head around the queryover apis.
Here is the example taken from the msdn for Linq to objects:
var scoreQuery = from student in students
from score in student.Scores
where score > 90
select new { Last = student.LastName, score };
Taken from [MSDN][1]
[1]: http://msdn.microsoft.com/en-us/library/bb383978.aspx | nhibernate | linq-to-nhibernate | queryover | nhibernate3 | null | null | open | nHibernate 3 QueryOver with compound from clause
===
Does anybody know a way to do compound from clauses - that are possible with Linq to objects - with nHibernate 3 QueryOver syntax. I know its possible with Linq To nHibernate, but I'm still trying to get my head around the queryover apis.
Here is the example taken from the msdn for Linq to objects:
var scoreQuery = from student in students
from score in student.Scores
where score > 90
select new { Last = student.LastName, score };
Taken from [MSDN][1]
[1]: http://msdn.microsoft.com/en-us/library/bb383978.aspx | 0 |
8,526,677 | 12/15/2011 21:13:24 | 1,092,946 | 12/12/2011 02:00:39 | 16 | 0 | How can i get xCode on a mac OS x snow leopard? | I would like xCode for C++ programming on my mac but it is a snow leopard and the version in the app store is only for lion and above. Is there a way to get xCode without paying $30 for lion or becoming an apple developer? | c++ | xcode | osx | version | osx-leopard | 12/16/2011 02:55:36 | not a real question | How can i get xCode on a mac OS x snow leopard?
===
I would like xCode for C++ programming on my mac but it is a snow leopard and the version in the app store is only for lion and above. Is there a way to get xCode without paying $30 for lion or becoming an apple developer? | 1 |
10,770,579 | 05/26/2012 23:38:36 | 206,765 | 11/09/2009 09:59:17 | 42 | 4 | Algorithms for weighted partitioning of numbers? | I'm looking for the most efficient algorithm with below pseudopod detailed functionality:
function(count,alpha){
if (alpha == 0){
partition [1..100] into equal "count" subsets
/*
e.g: count = 5
result: [1..20][21..40][41..60][61..80][81..100]
*/
}else{
//assuming alpha is always > 0 && alpha is a float number between 0 and 1
partition [1..100] in some manner where if alpha is closer to 1 the first
partitions be bigger and the last partitions be smaller and wise-verse
/*
e.g: count = 5, alpha = 1
result: [1..45][46..75][76..89][90..97][98..100]
e.g: count = 5, alpha = 0.2
result: [1..30][31..56][57..77][77..92][93..100]
*/
}
}
**Numbers are just for examples are not real numbers and the algorithm doesn't need to be really precise just an acceptable partitioning with the effect of alpha in size of partitions is adequate**
> FOR MORE VISUALLY DEFINING THE PROBLEM THINK A BOUT A GRID IN A **PERSPECTIVE VIEW** WHICH YOU SEE CLOSER DISTANCES BIGGER AND THE FAR DISTANCES SMALLER BUT IN FACT THEY ARE ALL SAME SIZE.
> THE **alpha** COULD BE ASSUMED AS A MEASURE OF PERSPECTIVE, WHEN WE ARE IN FRONTAL VIEW alpha = 0, MORE WE GO IN PERSPECTIVE THE ALPHA RAISE TO 1
Thanks in advance for your quality time
| c# | java | javascript | algorithm | null | 05/29/2012 04:40:17 | not constructive | Algorithms for weighted partitioning of numbers?
===
I'm looking for the most efficient algorithm with below pseudopod detailed functionality:
function(count,alpha){
if (alpha == 0){
partition [1..100] into equal "count" subsets
/*
e.g: count = 5
result: [1..20][21..40][41..60][61..80][81..100]
*/
}else{
//assuming alpha is always > 0 && alpha is a float number between 0 and 1
partition [1..100] in some manner where if alpha is closer to 1 the first
partitions be bigger and the last partitions be smaller and wise-verse
/*
e.g: count = 5, alpha = 1
result: [1..45][46..75][76..89][90..97][98..100]
e.g: count = 5, alpha = 0.2
result: [1..30][31..56][57..77][77..92][93..100]
*/
}
}
**Numbers are just for examples are not real numbers and the algorithm doesn't need to be really precise just an acceptable partitioning with the effect of alpha in size of partitions is adequate**
> FOR MORE VISUALLY DEFINING THE PROBLEM THINK A BOUT A GRID IN A **PERSPECTIVE VIEW** WHICH YOU SEE CLOSER DISTANCES BIGGER AND THE FAR DISTANCES SMALLER BUT IN FACT THEY ARE ALL SAME SIZE.
> THE **alpha** COULD BE ASSUMED AS A MEASURE OF PERSPECTIVE, WHEN WE ARE IN FRONTAL VIEW alpha = 0, MORE WE GO IN PERSPECTIVE THE ALPHA RAISE TO 1
Thanks in advance for your quality time
| 4 |
6,302,573 | 06/10/2011 06:05:36 | 758,861 | 05/18/2011 08:57:20 | 139 | 17 | Is there any encoding types in mysql | I want php URLENCODE type encoding for mysql columns.
Thanks in advance.
| php | mysql | null | null | null | 06/10/2011 06:12:09 | not a real question | Is there any encoding types in mysql
===
I want php URLENCODE type encoding for mysql columns.
Thanks in advance.
| 1 |
9,675,913 | 03/12/2012 22:49:08 | 490,529 | 10/28/2010 19:06:24 | 638 | 34 | Should library and media files be stored in the repository? | I'm using SVN but this question is related to any version control system.
When developing an application that uses media files(images, videos, xml files etc) that are constantly changed and almost every application version (or revision) is using a unique set of these media files which are not compatible with previous (or future) versions of these files. When this application uses certain versions of third party libraries which are incompatible with their previous or future versions. Is it a common practice to store all these binary files in the repository, e.g. SVN?
I think yes.
Pros:
- If the project is big and some functionality was broken in it or a bug have appeared you can always do an "Update to revision" and find that place where the bug appeared. And fix it.
- Making checkout and building the application is easy, because you have everything you need in your working copy to build the application
Cons:
- SVN server will need much HDD space to store all the versions. Somebody says that it becomes sluggish
- SVN Updates are slow
Are there any other advantages of storing only source code files in the repository? | svn | version-control | null | null | null | null | open | Should library and media files be stored in the repository?
===
I'm using SVN but this question is related to any version control system.
When developing an application that uses media files(images, videos, xml files etc) that are constantly changed and almost every application version (or revision) is using a unique set of these media files which are not compatible with previous (or future) versions of these files. When this application uses certain versions of third party libraries which are incompatible with their previous or future versions. Is it a common practice to store all these binary files in the repository, e.g. SVN?
I think yes.
Pros:
- If the project is big and some functionality was broken in it or a bug have appeared you can always do an "Update to revision" and find that place where the bug appeared. And fix it.
- Making checkout and building the application is easy, because you have everything you need in your working copy to build the application
Cons:
- SVN server will need much HDD space to store all the versions. Somebody says that it becomes sluggish
- SVN Updates are slow
Are there any other advantages of storing only source code files in the repository? | 0 |
11,708,573 | 07/29/2012 10:42:18 | 451,885 | 09/19/2010 11:42:00 | 514 | 32 | urllib2 Request issue | i am trying to open a page using urllib2
req = urllib2.Request("http://1033kissfm.com",
headers={'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0'})
response = urllib2.urlopen(req)
rstPage = response.read()
and the response is
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.0.3</center>
</body>
</html>
but when i open this url in browser its working fine
this is the url
http://1033kissfm.com
in browser it redirects to
http://www.1033kissfm.com/pages/main
page. | python | url | request | urllib2 | null | null | open | urllib2 Request issue
===
i am trying to open a page using urllib2
req = urllib2.Request("http://1033kissfm.com",
headers={'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0'})
response = urllib2.urlopen(req)
rstPage = response.read()
and the response is
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.0.3</center>
</body>
</html>
but when i open this url in browser its working fine
this is the url
http://1033kissfm.com
in browser it redirects to
http://www.1033kissfm.com/pages/main
page. | 0 |
5,524,256 | 04/02/2011 16:08:42 | 378,698 | 06/29/2010 06:37:10 | 1,017 | 53 | Returning a multidimensional array in c | I'm having issues with returning a multidimensional array. I create the array in a function and then modify it in another function. In the main function I want to print out the contents of the array as indicated below but, I am not getting anything to show up in the console.
Any suggestions? Thanks.
//Build the grid array given the number of rows, columns and levels
char ***buildGrid(int numRows, int numCols, int numLevels)
{
char ***levels;
levels = malloc(numLevels *sizeof(char *)); //Contains all levels
int rowIndex, levelIndex;
for (levelIndex = 0; levelIndex < numLevels; levelIndex++)
{
char **level = malloc(numRows * sizeof(char *)); //Contains all rows
for(rowIndex = 0; rowIndex < numRows; rowIndex++)
{
level[rowIndex] = malloc(numCols * sizeof(char)); //Contains all columns
}
levels[levelIndex] = level;
}
return levels;
}
void readGrid(char ***grid)
{
grid = buildGrid(3,3,3);
grid[0][0][0] = 'a';
}
void main(void)
{
char ***gridData;
readGrid(gridData);
printf("%c", grid[0][0][0]); //This does not output anything
}
| c | multidimensional-array | null | null | null | null | open | Returning a multidimensional array in c
===
I'm having issues with returning a multidimensional array. I create the array in a function and then modify it in another function. In the main function I want to print out the contents of the array as indicated below but, I am not getting anything to show up in the console.
Any suggestions? Thanks.
//Build the grid array given the number of rows, columns and levels
char ***buildGrid(int numRows, int numCols, int numLevels)
{
char ***levels;
levels = malloc(numLevels *sizeof(char *)); //Contains all levels
int rowIndex, levelIndex;
for (levelIndex = 0; levelIndex < numLevels; levelIndex++)
{
char **level = malloc(numRows * sizeof(char *)); //Contains all rows
for(rowIndex = 0; rowIndex < numRows; rowIndex++)
{
level[rowIndex] = malloc(numCols * sizeof(char)); //Contains all columns
}
levels[levelIndex] = level;
}
return levels;
}
void readGrid(char ***grid)
{
grid = buildGrid(3,3,3);
grid[0][0][0] = 'a';
}
void main(void)
{
char ***gridData;
readGrid(gridData);
printf("%c", grid[0][0][0]); //This does not output anything
}
| 0 |
1,620,062 | 10/25/2009 05:03:56 | 120,546 | 06/10/2009 13:58:44 | 69 | 0 | Are there any mature vector drawing libraries for Python? (that work on Windows) | I've tried endlessly to get pycairo to work on Windows, but version 1.8.8 won't install. Is there something comparable out there that actually works on Windows? | python | vector-graphics | drawing | svg | null | null | open | Are there any mature vector drawing libraries for Python? (that work on Windows)
===
I've tried endlessly to get pycairo to work on Windows, but version 1.8.8 won't install. Is there something comparable out there that actually works on Windows? | 0 |
9,290,203 | 02/15/2012 08:44:00 | 898,569 | 08/17/2011 12:03:11 | 157 | 3 | c# datagridview key handling | I use DataGridView, and in some places I add control to it (e.g. textbox, combobox)
dataGridView1.Controls.Add(comboBox);
comboBox.Focus();
The problem is that using this control, and than commiting choice by using ENTER cause the DataGridView to "handle" the key -> after clickng enter instead of choosing sth from combobox, the selection in datagridview changes( moves to next cell).
I use sth like :
public class MyDataGridView:DataGridView
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(keyData == Keys.Enter)
{
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
But it cause that datagridview and combobox doesn't answer to ENTER, and other keys...
Additional infromation: I must use ComboBox class, instead of DataGridViewCombobox. Can anyone help me how to handle ENTER in my comobox? | c# | winforms | datagridview | combobox | null | null | open | c# datagridview key handling
===
I use DataGridView, and in some places I add control to it (e.g. textbox, combobox)
dataGridView1.Controls.Add(comboBox);
comboBox.Focus();
The problem is that using this control, and than commiting choice by using ENTER cause the DataGridView to "handle" the key -> after clickng enter instead of choosing sth from combobox, the selection in datagridview changes( moves to next cell).
I use sth like :
public class MyDataGridView:DataGridView
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(keyData == Keys.Enter)
{
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
But it cause that datagridview and combobox doesn't answer to ENTER, and other keys...
Additional infromation: I must use ComboBox class, instead of DataGridViewCombobox. Can anyone help me how to handle ENTER in my comobox? | 0 |
10,405,601 | 05/01/2012 23:05:21 | 819,916 | 06/28/2011 20:16:08 | 144 | 0 | Convert String `000000001` to Integer `000000001` | String s = 000000001;
String e = 009999999;
Convert String `000000001` to Integer `000000001`.
I tried doing this with Integer.parseInt
int n = Integer.parseInt(s);
I am getting n = 1, but I want n should have 000000001
for (int ind = Integer.valueOf(s); ind < Integer.valueOf(e); ind++) {
String pp = "ggg" + ind; // I want pp should be like this- ggg000000001 and it keep on increasing like ggg000000002, then ggg000000003 and etc etc.
}
| java | null | null | null | null | 05/02/2012 20:52:41 | not a real question | Convert String `000000001` to Integer `000000001`
===
String s = 000000001;
String e = 009999999;
Convert String `000000001` to Integer `000000001`.
I tried doing this with Integer.parseInt
int n = Integer.parseInt(s);
I am getting n = 1, but I want n should have 000000001
for (int ind = Integer.valueOf(s); ind < Integer.valueOf(e); ind++) {
String pp = "ggg" + ind; // I want pp should be like this- ggg000000001 and it keep on increasing like ggg000000002, then ggg000000003 and etc etc.
}
| 1 |
3,457,672 | 08/11/2010 11:15:35 | 416,380 | 08/10/2010 16:17:12 | 1 | 0 | WSDL2Java won't create all the stubs | I'm using Apache axis2 and more specifically, the wsdl2java tool to generate the stubs for a web service and create a client, given the wsdl file.
When I try to generate stub classes for a paypal web service (its wsdl file is [here][1]) axis won't generate stubs for both the bindings included to the wsdl but just for the second one (PayPalAPIAASoapBinding)
Has anybody worked on this wsdl with apache's wsdl2java tool before?
[1]: https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl | java | apache | wsdl | axis2 | wsdl2java | null | open | WSDL2Java won't create all the stubs
===
I'm using Apache axis2 and more specifically, the wsdl2java tool to generate the stubs for a web service and create a client, given the wsdl file.
When I try to generate stub classes for a paypal web service (its wsdl file is [here][1]) axis won't generate stubs for both the bindings included to the wsdl but just for the second one (PayPalAPIAASoapBinding)
Has anybody worked on this wsdl with apache's wsdl2java tool before?
[1]: https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl | 0 |
8,730,048 | 01/04/2012 16:14:27 | 182,542 | 10/01/2009 14:50:31 | 722 | 46 | Use properties of different model in view (.net MVC) | I am learning MVC and display a list of products in a view.
@model IEnumerable<Domain.Model.Product>
<table>
<tr>
<th style="width:50px; text-align:left">Id</th>
<th style="text-align:left">Name</th>
<th style="text-align:left">Category</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Category.Name)
</td>
</tr>
}
</table>
The products belong to categories, which are displayed in the right column. I now want to filter the products by categories, for which I would like to use a dropdownlist control. I found @Html.DropDownListFor(), but as far as I understand, this will only give me properties of the currently underlying model (Product). | .net | mvc | view | model | null | null | open | Use properties of different model in view (.net MVC)
===
I am learning MVC and display a list of products in a view.
@model IEnumerable<Domain.Model.Product>
<table>
<tr>
<th style="width:50px; text-align:left">Id</th>
<th style="text-align:left">Name</th>
<th style="text-align:left">Category</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Category.Name)
</td>
</tr>
}
</table>
The products belong to categories, which are displayed in the right column. I now want to filter the products by categories, for which I would like to use a dropdownlist control. I found @Html.DropDownListFor(), but as far as I understand, this will only give me properties of the currently underlying model (Product). | 0 |
8,328,644 | 11/30/2011 15:42:44 | 541,839 | 12/14/2010 11:08:34 | 153 | 15 | rails 3 routing not working as i would like | How would i go about routing the default page in my rails application to :
http://localhost:3000/pages/1
at the moment in my routes file i have:-
root :to => 'pages#show' | ruby-on-rails | rails-routing | null | null | null | null | open | rails 3 routing not working as i would like
===
How would i go about routing the default page in my rails application to :
http://localhost:3000/pages/1
at the moment in my routes file i have:-
root :to => 'pages#show' | 0 |
1,958,095 | 12/24/2009 12:02:55 | 45,956 | 12/13/2008 11:39:15 | 2,822 | 102 | Silverlight - Grabbing all binding information of elements in a given visual stree? | We are loading some xaml for an Element at runtime (XamlReader.Load) for some preview purposes. Need less to say, the properties/bindings are not know as they can vary across elements/controls we are loading.
As the run time view model context is not available when we load the control for preview - after loading the Element, the idea is to grab the binding information, create a type with those propertes at run time, to assign the same as the data context of the loaded control.
We'll be using AssemblyBuilder/ModuleBuilder/TypeBuilder to build a type at run time. Having said that, we need to walk the visual tree to identify the bindings involved, to create a list of binding paths.
Obviously, one way is to use regex to parse the xaml directly and build this list.. Just want to know a way exist so that I can grab the bindings and related paths from the visual tree itself?
Thanks | silverlight | wpf | xaml | .net | visual-studio | null | open | Silverlight - Grabbing all binding information of elements in a given visual stree?
===
We are loading some xaml for an Element at runtime (XamlReader.Load) for some preview purposes. Need less to say, the properties/bindings are not know as they can vary across elements/controls we are loading.
As the run time view model context is not available when we load the control for preview - after loading the Element, the idea is to grab the binding information, create a type with those propertes at run time, to assign the same as the data context of the loaded control.
We'll be using AssemblyBuilder/ModuleBuilder/TypeBuilder to build a type at run time. Having said that, we need to walk the visual tree to identify the bindings involved, to create a list of binding paths.
Obviously, one way is to use regex to parse the xaml directly and build this list.. Just want to know a way exist so that I can grab the bindings and related paths from the visual tree itself?
Thanks | 0 |
9,389,557 | 02/22/2012 05:30:20 | 1,089,679 | 12/09/2011 12:08:53 | 184 | 2 | FOTA : How can i do firmware update over the air? | Here i want to update my device fireware.
After downloading the file from somewhere(server) what can i do for update the firmware?
Please Tell me the way how can i achieve this and which things i have to keep in my mind to achieve this goal.
What is the Steps for this?
i want to make first design how can i go ahead to achieve this goal.
i researched on this on google but i cant get any useful link which give me clear idea about this.
Please provides me some useful links so from that i can get clear idea about this.
here i have on link regarding my research [link][1]
[1]: http://www.zeeis.com/firmware-over-the-air/?gclid=CJShrIDssK4CFUp76wod-G5URA | c | firmware | ota | null | null | 02/22/2012 14:32:52 | not a real question | FOTA : How can i do firmware update over the air?
===
Here i want to update my device fireware.
After downloading the file from somewhere(server) what can i do for update the firmware?
Please Tell me the way how can i achieve this and which things i have to keep in my mind to achieve this goal.
What is the Steps for this?
i want to make first design how can i go ahead to achieve this goal.
i researched on this on google but i cant get any useful link which give me clear idea about this.
Please provides me some useful links so from that i can get clear idea about this.
here i have on link regarding my research [link][1]
[1]: http://www.zeeis.com/firmware-over-the-air/?gclid=CJShrIDssK4CFUp76wod-G5URA | 1 |
10,321,691 | 04/25/2012 18:33:09 | 1,157,393 | 01/18/2012 23:50:02 | 61 | 2 | Is it bad to store images in a database table? | I have heard people saying that you shouldnt store images in database table and then other people saying you should.
What do you think? | php | mysql | database | image | table | 04/25/2012 18:37:46 | not constructive | Is it bad to store images in a database table?
===
I have heard people saying that you shouldnt store images in database table and then other people saying you should.
What do you think? | 4 |
6,807,400 | 07/24/2011 14:30:16 | 538,888 | 12/11/2010 13:22:59 | 15 | 0 | samba setting on macosx | when using linux, add **guest ok = yes** in **smb.conf**
then PC could access \\\xxx.xxx.xxx.xxx with no name and password
with macosx i use file sharing with smb, could anyone tell me how to do it in GUI setting
thanks in advance | osx | samba | file-sharing | fileshare | null | 07/24/2011 15:07:29 | off topic | samba setting on macosx
===
when using linux, add **guest ok = yes** in **smb.conf**
then PC could access \\\xxx.xxx.xxx.xxx with no name and password
with macosx i use file sharing with smb, could anyone tell me how to do it in GUI setting
thanks in advance | 2 |
9,854,218 | 03/24/2012 18:13:38 | 561,395 | 01/03/2011 15:06:36 | 1,166 | 6 | writeToPath:atomically: - not sure why this is failing | This is the code i have. The NSDictionary did used to be something, but i've temporarily removed that, when trying to find the problem.
NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Entries/"];
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDirectory = NO;
BOOL directoryExists = [fileManager fileExistsAtPath:path isDirectory:&isDirectory];
if (!directoryExists) {
[fileManager createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:nil];
}
if ([self.pathName isEqualToString:@""] || self.pathName == nil) {
self.pathName = [NSString stringWithFormat:@"%@.JEntry", [JMedia generateUuidString]];
}
NSString *entryPath = [path stringByAppendingPathComponent:self.pathName];
NSDictionary *dictionary;
NSLog(@"entrypath: %@", entryPath);
BOOL success = [dictionary writeToFile:entryPath atomically:YES];
NSLog(@"success: %i", success);
NSLog:
entrypath: /var/mobile/Applications/1B838285-8326-427A-8AC5-0D5567C3CD81/Documents/Entries/70AFCF6D-540E-436E-9989-68793500E35B.JEntry
success: 0 | iphone | objective-c | nsdictionary | nsdata | null | null | open | writeToPath:atomically: - not sure why this is failing
===
This is the code i have. The NSDictionary did used to be something, but i've temporarily removed that, when trying to find the problem.
NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Entries/"];
NSFileManager *fileManager = [NSFileManager defaultManager];
BOOL isDirectory = NO;
BOOL directoryExists = [fileManager fileExistsAtPath:path isDirectory:&isDirectory];
if (!directoryExists) {
[fileManager createDirectoryAtPath:path withIntermediateDirectories:NO attributes:nil error:nil];
}
if ([self.pathName isEqualToString:@""] || self.pathName == nil) {
self.pathName = [NSString stringWithFormat:@"%@.JEntry", [JMedia generateUuidString]];
}
NSString *entryPath = [path stringByAppendingPathComponent:self.pathName];
NSDictionary *dictionary;
NSLog(@"entrypath: %@", entryPath);
BOOL success = [dictionary writeToFile:entryPath atomically:YES];
NSLog(@"success: %i", success);
NSLog:
entrypath: /var/mobile/Applications/1B838285-8326-427A-8AC5-0D5567C3CD81/Documents/Entries/70AFCF6D-540E-436E-9989-68793500E35B.JEntry
success: 0 | 0 |
6,945,058 | 08/04/2011 16:27:01 | 128,431 | 06/24/2009 19:29:52 | 565 | 32 | Building CGAL for 32 bit architecture -- or Cinder for 64-bit | Has anyone ever tried to build CGAL for i386 (32 bit) architecture? My issue is that I'm trying to get CGAL to work with Cinder, which is by default compiled for i386. Alternately I could try to get Cinder to compile as a 64-bit binary. What is my best option? I'm on a Mac, btw. | c++ | osx | darwin | cgal | cinder | 08/05/2011 03:06:54 | not a real question | Building CGAL for 32 bit architecture -- or Cinder for 64-bit
===
Has anyone ever tried to build CGAL for i386 (32 bit) architecture? My issue is that I'm trying to get CGAL to work with Cinder, which is by default compiled for i386. Alternately I could try to get Cinder to compile as a 64-bit binary. What is my best option? I'm on a Mac, btw. | 1 |
11,307,678 | 07/03/2012 09:04:04 | 1,425,543 | 05/30/2012 08:31:46 | 3 | 0 | How can I combine text from several methods in a textbox in C#? | I want to get Text from some text files and insert it to a text box. I created some methods, which get the text of the files. My aim is to combine the text files to one text. the problem is that the program shows me only the last text file.
How can I combine all text files to one?
THX | c# | sharepoint | methods | text-files | combine | 07/08/2012 23:13:35 | too localized | How can I combine text from several methods in a textbox in C#?
===
I want to get Text from some text files and insert it to a text box. I created some methods, which get the text of the files. My aim is to combine the text files to one text. the problem is that the program shows me only the last text file.
How can I combine all text files to one?
THX | 3 |
5,294,916 | 03/14/2011 05:00:51 | 244,098 | 01/05/2010 16:39:31 | 87 | 6 | Reassigning a boolean if not true | I have a method foo() and foobar() that both return a boolean. Each of them must be executed regardless of the result.
boolean changed = true;
while(changed) {
changed = foo();
if(!changed) {
changed = foobar();
}
else {
foobar();
}
}
I want the loop to keep executing for as long as changed is true, but I feel like the second code block of ifs and elses for foobar() is not very... elegant. Is there a better way to write that part so that the variable changed will only be reassigned if it's not already true?
Thanks! | java | boolean-logic | boolean-operations | null | null | null | open | Reassigning a boolean if not true
===
I have a method foo() and foobar() that both return a boolean. Each of them must be executed regardless of the result.
boolean changed = true;
while(changed) {
changed = foo();
if(!changed) {
changed = foobar();
}
else {
foobar();
}
}
I want the loop to keep executing for as long as changed is true, but I feel like the second code block of ifs and elses for foobar() is not very... elegant. Is there a better way to write that part so that the variable changed will only be reassigned if it's not already true?
Thanks! | 0 |
11,478,459 | 07/13/2012 21:12:36 | 811,115 | 06/22/2011 20:28:20 | 106 | 0 | Where is the RCPP package in R? | I can't find the rcpp package on any CRAN mirror. Has it been removed? I need this package to use the forecast package. | r | null | null | null | null | 07/13/2012 21:29:06 | too localized | Where is the RCPP package in R?
===
I can't find the rcpp package on any CRAN mirror. Has it been removed? I need this package to use the forecast package. | 3 |
10,290,942 | 04/24/2012 02:19:31 | 963,396 | 09/25/2011 07:51:12 | 161 | 0 | Nest custom exception class within class? (Python) | I'd like to nest an Exception subclass within a class of my own, like so:
class Foo(object):
def bar(self):
#does something that raises MyException
class MyException(Exception):
pass
This way, I only have to import Foo (and not MyException) when calling bar() from another module. But what I have below doesn't work:
from foo_module import Foo
foo = Foo()
try:
foo.bar()
except Foo.MyException as e:
print e
Python gives this error:
> type object 'Foo' has no attribute 'MyException'
Is there a way to do this? | python | class | scope | nested | nested-class | 04/25/2012 18:56:43 | too localized | Nest custom exception class within class? (Python)
===
I'd like to nest an Exception subclass within a class of my own, like so:
class Foo(object):
def bar(self):
#does something that raises MyException
class MyException(Exception):
pass
This way, I only have to import Foo (and not MyException) when calling bar() from another module. But what I have below doesn't work:
from foo_module import Foo
foo = Foo()
try:
foo.bar()
except Foo.MyException as e:
print e
Python gives this error:
> type object 'Foo' has no attribute 'MyException'
Is there a way to do this? | 3 |
9,688,857 | 03/13/2012 17:19:37 | 835,038 | 07/08/2011 08:54:05 | 506 | 2 | Scroll height in a DIV | ![enter image description here][1]
[1]: http://i.stack.imgur.com/52UZl.jpg
As shown in the image, how can i find the scrolled height relative to DIV not to window | javascript | jquery | scroll | null | null | null | open | Scroll height in a DIV
===
![enter image description here][1]
[1]: http://i.stack.imgur.com/52UZl.jpg
As shown in the image, how can i find the scrolled height relative to DIV not to window | 0 |
11,500,867 | 07/16/2012 08:49:30 | 1,215,629 | 02/17/2012 07:11:28 | 26 | 0 | Connect to server via SSH | Now I have several infor as follow:
IP 111.71.210.31
domain websock.linfo.vn
port 22
useriidj myfind
pw babados
I want to connect to server use SSH ..How must I do ?? | ssh | openssh | null | null | null | 07/16/2012 18:42:19 | off topic | Connect to server via SSH
===
Now I have several infor as follow:
IP 111.71.210.31
domain websock.linfo.vn
port 22
useriidj myfind
pw babados
I want to connect to server use SSH ..How must I do ?? | 2 |
10,066,225 | 04/08/2012 20:28:00 | 1,080,355 | 12/04/2011 18:14:47 | 3 | 1 | Blank Report on Kiosk Printer | I'm creating an application which is going to print customer bills in shops.
I've used C# language and RDLC to print report and invoices.
Although reports are shown normally in PDF report and other printers, but when I use receipt printer, they will only print a small piece of blank paper and cut the paper!
My report height is about 10 cm (4") and its width is 8 cm however the printer feed out a paper with height about 1 cm and cut it out.
My problems are:
1- Is kiosk printers need special setting for printing reports?
2- Receipt printer print pages without no boundary in length, but page size in reports are limited, how can i fix this? | c# | printing | report | rdlc | kiosk | 04/09/2012 20:38:48 | not a real question | Blank Report on Kiosk Printer
===
I'm creating an application which is going to print customer bills in shops.
I've used C# language and RDLC to print report and invoices.
Although reports are shown normally in PDF report and other printers, but when I use receipt printer, they will only print a small piece of blank paper and cut the paper!
My report height is about 10 cm (4") and its width is 8 cm however the printer feed out a paper with height about 1 cm and cut it out.
My problems are:
1- Is kiosk printers need special setting for printing reports?
2- Receipt printer print pages without no boundary in length, but page size in reports are limited, how can i fix this? | 1 |
11,070,473 | 06/17/2012 10:02:29 | 1,461,653 | 06/17/2012 09:47:06 | 1 | 0 | how can i use jpeg_mem_src, jpeg_mem_dest in libjpeg-turbo? | libjpeg8 have those two functions, but in libjpeg-turbo have a next:
//jconfig.h
#define JPEG_LIB_VERSION 62
...
//jpeglib.h
#if JPEG_LIB_VERSION >= 80
/* Data source and destination managers: memory buffers. */
EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
unsigned char ** outbuffer,
unsigned long * outsize));
EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
unsigned char * inbuffer,
unsigned long insize));
#endif
if i try to use "JPEG_LIB_VERSION 80" then have next:
> error LNK2019: unresolved external symbol _jpeg_mem_src referenced in function ...
so, how can i use those functions if it possible? i need to compile some package of libjpeg-turbo? | c++ | libjpeg | libjpeg-turbo | null | null | null | open | how can i use jpeg_mem_src, jpeg_mem_dest in libjpeg-turbo?
===
libjpeg8 have those two functions, but in libjpeg-turbo have a next:
//jconfig.h
#define JPEG_LIB_VERSION 62
...
//jpeglib.h
#if JPEG_LIB_VERSION >= 80
/* Data source and destination managers: memory buffers. */
EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo,
unsigned char ** outbuffer,
unsigned long * outsize));
EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo,
unsigned char * inbuffer,
unsigned long insize));
#endif
if i try to use "JPEG_LIB_VERSION 80" then have next:
> error LNK2019: unresolved external symbol _jpeg_mem_src referenced in function ...
so, how can i use those functions if it possible? i need to compile some package of libjpeg-turbo? | 0 |
11,323,240 | 07/04/2012 06:02:23 | 1,041,171 | 11/11/2011 06:26:34 | 19 | 1 | How to make app like ATM machine? | How can i make my apps like an ATM machine when my app started any of the application can't be start ? | android | android-intent | null | null | null | 07/04/2012 06:08:44 | not a real question | How to make app like ATM machine?
===
How can i make my apps like an ATM machine when my app started any of the application can't be start ? | 1 |
8,878,717 | 01/16/2012 10:30:48 | 768,472 | 05/24/2011 20:23:16 | 606 | 24 | Apple Dev Portal is showing other people's and company's provisioning information, not my own? | Not sure where to post this, but I can't find any information anywhere and it seems a bit urgent. When I login to Apple's developer site and go into the provisioning portal, there are app ids, devices, certificates, and company names that I do not recognize. I have sent an email to Apple but it could be days before it is seen and this is a serious security issue. I cannot access any of my own data, and it says I am someone else; I cannot logout this other person, and clearing cache and restarting browser doesn't remove this person as the logged-in user. If I click on "app ids" i see yet another person, the logged-in name changes. If I click on Edit Profile, it correctly shows my name. But nothing I can do allows me to actually see any of my own apps that have been published, and I surely wonder if others are able to somehow see my own apps just like I can see theirs.
Anyone know a more urgent place to report this? Is it happening to anyone else, or have you experienced this before? | objective-c | xcode | apple | itunesconnect | null | 01/17/2012 09:04:24 | off topic | Apple Dev Portal is showing other people's and company's provisioning information, not my own?
===
Not sure where to post this, but I can't find any information anywhere and it seems a bit urgent. When I login to Apple's developer site and go into the provisioning portal, there are app ids, devices, certificates, and company names that I do not recognize. I have sent an email to Apple but it could be days before it is seen and this is a serious security issue. I cannot access any of my own data, and it says I am someone else; I cannot logout this other person, and clearing cache and restarting browser doesn't remove this person as the logged-in user. If I click on "app ids" i see yet another person, the logged-in name changes. If I click on Edit Profile, it correctly shows my name. But nothing I can do allows me to actually see any of my own apps that have been published, and I surely wonder if others are able to somehow see my own apps just like I can see theirs.
Anyone know a more urgent place to report this? Is it happening to anyone else, or have you experienced this before? | 2 |
11,310,963 | 07/03/2012 12:31:42 | 900,119 | 01/21/2010 09:42:44 | 1,568 | 97 | Bookmarking pages resulting from HTTP POST | I'm looking into alternatives for bookmarking Ajax pages. I quickly found two alternatives, namely the `hashchange` event and the HTML5 History API. Both options are available through jQuery plugins, which of course makes them easier to use. I'm leaning towards [History.js][1] as the HTML5 solution seems to be the way to go and this plugin gracefully degrades for "older" (IE9 is not that old) browsers.
However, from the documentation I'm not sure whether the plugin is suitable for my needs. I have a site which is build using ASP.NET MVC and various pages are rendered based on the results from AJAX POSTs.
Now I'm wondering how to modify the state of a page after the HTML is returned from the Action and rendered on the page. The resulting HTML is based on the information in the POST header (usually some kind of JSON object). Should I store the JSON in the page state? And how can I bookmark this as the information cannot be stored in the URL due to size limitations.
--------------------------------
Having written the above, I realise it might be difficult to answer this question without some context. Basically we use (abuse?) the POST to retrieve (parts of) new pages. We could not do this using a standard GET as the size of the URL became too big due to the number and size of the parameters. However, now we run into the common problem when AJAXifying a webpage, namely that you cannot bookmark the resulting pages unless some action is undertaken. This lead us to the jQuery plugins mentioned above. However, it is not clear how an API like History.js can be used to allow creation of bookmarks for pages which are (partly) the result of AJAX POST requests. How is the state retained if someone deeplinks to a page which contained such results when the bookmark was created?
--------------------------------
Anyway, I hope this provides some more context on the origin of the question. Thanks for anyone who can shed some light on this
[1]: https://github.com/balupton/history.js/ | jquery | asp.net | asp.net-mvc-3 | null | null | null | open | Bookmarking pages resulting from HTTP POST
===
I'm looking into alternatives for bookmarking Ajax pages. I quickly found two alternatives, namely the `hashchange` event and the HTML5 History API. Both options are available through jQuery plugins, which of course makes them easier to use. I'm leaning towards [History.js][1] as the HTML5 solution seems to be the way to go and this plugin gracefully degrades for "older" (IE9 is not that old) browsers.
However, from the documentation I'm not sure whether the plugin is suitable for my needs. I have a site which is build using ASP.NET MVC and various pages are rendered based on the results from AJAX POSTs.
Now I'm wondering how to modify the state of a page after the HTML is returned from the Action and rendered on the page. The resulting HTML is based on the information in the POST header (usually some kind of JSON object). Should I store the JSON in the page state? And how can I bookmark this as the information cannot be stored in the URL due to size limitations.
--------------------------------
Having written the above, I realise it might be difficult to answer this question without some context. Basically we use (abuse?) the POST to retrieve (parts of) new pages. We could not do this using a standard GET as the size of the URL became too big due to the number and size of the parameters. However, now we run into the common problem when AJAXifying a webpage, namely that you cannot bookmark the resulting pages unless some action is undertaken. This lead us to the jQuery plugins mentioned above. However, it is not clear how an API like History.js can be used to allow creation of bookmarks for pages which are (partly) the result of AJAX POST requests. How is the state retained if someone deeplinks to a page which contained such results when the bookmark was created?
--------------------------------
Anyway, I hope this provides some more context on the origin of the question. Thanks for anyone who can shed some light on this
[1]: https://github.com/balupton/history.js/ | 0 |
6,833,446 | 07/26/2011 16:33:19 | 863,883 | 07/26/2011 16:33:19 | 1 | 0 | Flex: How to apply CSS to ActionScript Componet? | I have a Flex ActionScript component. How can I apply CSS to this component? I'm hoping to be able to apply styles from an external CSS file.
CSS Selector in file 'global.css':
.myPanel
{
color:#cccccc;
background-color:#333333;
border-color:#ff0000;
border-style:solid;
}
My Flex component:
package components
{
import mx.containers.Panel;
public class myPanel extends Panel
{
public function myPanel()
{
super();
}
override protected function createChildren():void
{
super.createChildren();
}
}
}
| css | flex | null | null | null | null | open | Flex: How to apply CSS to ActionScript Componet?
===
I have a Flex ActionScript component. How can I apply CSS to this component? I'm hoping to be able to apply styles from an external CSS file.
CSS Selector in file 'global.css':
.myPanel
{
color:#cccccc;
background-color:#333333;
border-color:#ff0000;
border-style:solid;
}
My Flex component:
package components
{
import mx.containers.Panel;
public class myPanel extends Panel
{
public function myPanel()
{
super();
}
override protected function createChildren():void
{
super.createChildren();
}
}
}
| 0 |
6,366,814 | 06/16/2011 03:33:21 | 419,090 | 08/13/2010 01:48:50 | 125 | 4 | Javascript not working | I am using this code to make stars light up when you hover over them(a rating system). It works absolutely perfectly in Chrome, but when I tried to use it in IE, it doesn't do anything. Can anyone help me make this work in IE? (Yes, I know the code looks horrible. I am very new to Javascript, which is probably why this bug is happening.) Anyways:
HTML Code:
<div name="stars" class="stars">
<input name="bob" id="hid" type="hidden" />
<div id="str1" style="display: inline-block;" class="no_star"></div>
<div id="str2" style="display: inline-block;" class="no_star"></div>
<div id="str3" style="display: inline-block;" class="no_star"></div>
<div id="str4" style="display: inline-block;" class="no_star"></div>
<div id="str5" style="display: inline-block;" class="no_star"></div>
</div>
Javascript Code:
<script type="text/javascript">
function isElement(obj) {
try {
return obj instanceof HTMLElement;
}
catch(e){
return (typeof obj==="object") &&
(obj.nodeType===1) && (typeof obj.style === "object") &&
(typeof obj.ownerDocument ==="object");
}
}
function childbyid(el, str)
{
var children = el.childNodes;
for(i in children)
{
if (isElement(children[i]) === true && typeof children[i] != 'undefined')
{
if (children[i].getAttribute('id') == str)
{
return children[i];
}
}
}
}
var star_bob = new Array();
function select(arr, n)
{
star_bob[arr][2] = n;
star_bob[arr][1].setAttribute("value", n+1);
if (document.getElementById('star_post') != null)
{
document.getElementById('star_post').submit();
}
}
function highlight(arr, n)
{
if (n == -1)
{
n = star_bob[arr][2];
}
arr = star_bob[arr][0];
for (z in arr){
if (z <= n){
arr[z].setAttribute("class", "full_star")
}
else
{
arr[z].setAttribute("class", "no_star")
}
}
}
var star_all = document.getElementsByName('stars');
for (x in star_all){
var stars = new Array();
stars[0]=childbyid(star_all[x], 'str1');
stars[1]=childbyid(star_all[x], 'str2');
stars[2]=childbyid(star_all[x], 'str3');
stars[3]=childbyid(star_all[x], 'str4');
stars[4]=childbyid(star_all[x], 'str5');
for (o in stars){
if (typeof stars[o] != 'undefined')
{
stars[o].setAttribute("onmouseover", "highlight(" + x + ", " + o + ")")
stars[o].setAttribute("onmouseout", "highlight(" + x + ", -1)")
stars[o].setAttribute("onclick", "select(" + x + ", " + o + ")");
}
}
if (typeof star_all[x] == "object")
{
star_bob[x] = new Array(stars, childbyid(star_all[x],"hid"),-1);
}
}
</script> | javascript | html | internet-explorer | null | null | 06/16/2011 14:29:05 | too localized | Javascript not working
===
I am using this code to make stars light up when you hover over them(a rating system). It works absolutely perfectly in Chrome, but when I tried to use it in IE, it doesn't do anything. Can anyone help me make this work in IE? (Yes, I know the code looks horrible. I am very new to Javascript, which is probably why this bug is happening.) Anyways:
HTML Code:
<div name="stars" class="stars">
<input name="bob" id="hid" type="hidden" />
<div id="str1" style="display: inline-block;" class="no_star"></div>
<div id="str2" style="display: inline-block;" class="no_star"></div>
<div id="str3" style="display: inline-block;" class="no_star"></div>
<div id="str4" style="display: inline-block;" class="no_star"></div>
<div id="str5" style="display: inline-block;" class="no_star"></div>
</div>
Javascript Code:
<script type="text/javascript">
function isElement(obj) {
try {
return obj instanceof HTMLElement;
}
catch(e){
return (typeof obj==="object") &&
(obj.nodeType===1) && (typeof obj.style === "object") &&
(typeof obj.ownerDocument ==="object");
}
}
function childbyid(el, str)
{
var children = el.childNodes;
for(i in children)
{
if (isElement(children[i]) === true && typeof children[i] != 'undefined')
{
if (children[i].getAttribute('id') == str)
{
return children[i];
}
}
}
}
var star_bob = new Array();
function select(arr, n)
{
star_bob[arr][2] = n;
star_bob[arr][1].setAttribute("value", n+1);
if (document.getElementById('star_post') != null)
{
document.getElementById('star_post').submit();
}
}
function highlight(arr, n)
{
if (n == -1)
{
n = star_bob[arr][2];
}
arr = star_bob[arr][0];
for (z in arr){
if (z <= n){
arr[z].setAttribute("class", "full_star")
}
else
{
arr[z].setAttribute("class", "no_star")
}
}
}
var star_all = document.getElementsByName('stars');
for (x in star_all){
var stars = new Array();
stars[0]=childbyid(star_all[x], 'str1');
stars[1]=childbyid(star_all[x], 'str2');
stars[2]=childbyid(star_all[x], 'str3');
stars[3]=childbyid(star_all[x], 'str4');
stars[4]=childbyid(star_all[x], 'str5');
for (o in stars){
if (typeof stars[o] != 'undefined')
{
stars[o].setAttribute("onmouseover", "highlight(" + x + ", " + o + ")")
stars[o].setAttribute("onmouseout", "highlight(" + x + ", -1)")
stars[o].setAttribute("onclick", "select(" + x + ", " + o + ")");
}
}
if (typeof star_all[x] == "object")
{
star_bob[x] = new Array(stars, childbyid(star_all[x],"hid"),-1);
}
}
</script> | 3 |
11,564,324 | 07/19/2012 15:37:33 | 1,339,799 | 04/17/2012 21:07:37 | 3 | 0 | Capybara - Is it possible to click by xpath in the iframe? | all ! I use capybara.
Is it possible to click by xpath in the iframe ?
I mean, that I want to press Facebook Login button. | testing | capybara | null | null | null | 07/20/2012 17:12:02 | not a real question | Capybara - Is it possible to click by xpath in the iframe?
===
all ! I use capybara.
Is it possible to click by xpath in the iframe ?
I mean, that I want to press Facebook Login button. | 1 |
762,278 | 04/17/2009 21:30:55 | 29,277 | 10/18/2008 18:46:10 | 195 | 11 | In the teardown event during an NUnit test how can I get to the attribute applied to the method that was just tested? | I have a test method that is run. When the method generates an exception I want to know what the name of the test was and the exception content.
In the teardown for the test I want to get access to this information. How would I get access to it from the TearDown attributed method? | nunit | null | null | null | null | null | open | In the teardown event during an NUnit test how can I get to the attribute applied to the method that was just tested?
===
I have a test method that is run. When the method generates an exception I want to know what the name of the test was and the exception content.
In the teardown for the test I want to get access to this information. How would I get access to it from the TearDown attributed method? | 0 |
11,113,333 | 06/20/2012 05:29:51 | 66,767 | 02/16/2009 01:20:32 | 938 | 26 | CakePHP: Proper way to delete a record securely | I have this in my Controller.
public function delete($id) {
if($this->request->is('get')) {
throw new MethodNotAllowedException();
}
$this->Memberlist->id = $id;
if (!$this->Memberlist->exists()) {
throw new NotFoundException(__('Invalid list.'));
}
if ($this->Memberlist->delete()) {
$this->Session->setFlash(__('List deleted.'), 'success');
return $this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('List was not deleted.'), 'error');
return $this->redirect(array('action'=>'index'));
}
In one of my views, I have something like this:
echo $this->Form->postLink('Delete',
array('action' => 'delete', $list['Memberlist']['id']),
array('class'=>'btn-mini btn', 'confirm' => 'Are you sure?'));
Which creates a HTML like this:
<form id="post_4fe15efc0d284" method="post" style="display:none;" name="post_4fe15efc0d284" action="/Grid/memberlists/delete/9">
<input type="hidden" value="POST" name="_method">
<input id="Token1627936788" type="hidden" value="8756f7ad21f3ab93dd6fb9a4861e3aed4496f3f9" name="data[_Token][key]">
<div style="display:none;">
</form>
<a class="btn-mini btn" onclick="if (confirm('Are you sure?')) { document.post_4fe15efc0d284.submit(); } event.returnValue = false; return false;" href="#">Delete</a>
The problem is that when I update the `ID` found in `action="/Grid/memberlists/delete/9"` using Firebug (or any developer tool), I can pretty much delete anything! Even though I have the Security Component turned on.
What would be the proper way to do this? | php | cakephp | cakephp-2.0 | cakephp-2.1 | null | null | open | CakePHP: Proper way to delete a record securely
===
I have this in my Controller.
public function delete($id) {
if($this->request->is('get')) {
throw new MethodNotAllowedException();
}
$this->Memberlist->id = $id;
if (!$this->Memberlist->exists()) {
throw new NotFoundException(__('Invalid list.'));
}
if ($this->Memberlist->delete()) {
$this->Session->setFlash(__('List deleted.'), 'success');
return $this->redirect(array('action'=>'index'));
}
$this->Session->setFlash(__('List was not deleted.'), 'error');
return $this->redirect(array('action'=>'index'));
}
In one of my views, I have something like this:
echo $this->Form->postLink('Delete',
array('action' => 'delete', $list['Memberlist']['id']),
array('class'=>'btn-mini btn', 'confirm' => 'Are you sure?'));
Which creates a HTML like this:
<form id="post_4fe15efc0d284" method="post" style="display:none;" name="post_4fe15efc0d284" action="/Grid/memberlists/delete/9">
<input type="hidden" value="POST" name="_method">
<input id="Token1627936788" type="hidden" value="8756f7ad21f3ab93dd6fb9a4861e3aed4496f3f9" name="data[_Token][key]">
<div style="display:none;">
</form>
<a class="btn-mini btn" onclick="if (confirm('Are you sure?')) { document.post_4fe15efc0d284.submit(); } event.returnValue = false; return false;" href="#">Delete</a>
The problem is that when I update the `ID` found in `action="/Grid/memberlists/delete/9"` using Firebug (or any developer tool), I can pretty much delete anything! Even though I have the Security Component turned on.
What would be the proper way to do this? | 0 |
9,924,886 | 03/29/2012 11:59:02 | 1,293,127 | 03/26/2012 13:26:22 | 6 | 0 | python open(file) on a hardlink | Using Python 2.5+, UNIX:
I have a program which simulates directory "copy-on-write" functionality, by hardlinking all entries. Currently all the underlying code, some of which I don't have access to, uses standard `open(fname, 'w')` to write the regular files.
But with hardlinks, this means the same inode is used (just truncated), so the original content is destroyed as well. For copy-on-write, I would of course want the original to remain untouched (old inode) and the `open('w')` call to create a new inode.
Any ideas on the best way to achieve this? Monkey-patch `open` somehow?
What I came up with so far is overriding `open` to try to delete the file first (if it exists) and only then do `open('w')`.
| python | hardlink | null | null | null | null | open | python open(file) on a hardlink
===
Using Python 2.5+, UNIX:
I have a program which simulates directory "copy-on-write" functionality, by hardlinking all entries. Currently all the underlying code, some of which I don't have access to, uses standard `open(fname, 'w')` to write the regular files.
But with hardlinks, this means the same inode is used (just truncated), so the original content is destroyed as well. For copy-on-write, I would of course want the original to remain untouched (old inode) and the `open('w')` call to create a new inode.
Any ideas on the best way to achieve this? Monkey-patch `open` somehow?
What I came up with so far is overriding `open` to try to delete the file first (if it exists) and only then do `open('w')`.
| 0 |
10,991,436 | 06/12/2012 06:20:30 | 1,348,201 | 04/21/2012 11:01:54 | 16 | 0 | Mysql approach on choosing the right version for PROD acc to Oracle Distribution standards.. | I have a query on choosing mysql distribution release for production server. According to me, I go for GA community version server on 64BIT. This is my only approach for prod servers. Is this approach is correct?? Kindly help. | mysql | null | null | null | null | null | open | Mysql approach on choosing the right version for PROD acc to Oracle Distribution standards..
===
I have a query on choosing mysql distribution release for production server. According to me, I go for GA community version server on 64BIT. This is my only approach for prod servers. Is this approach is correct?? Kindly help. | 0 |
6,144,332 | 05/26/2011 19:59:16 | 393,373 | 07/16/2010 00:41:08 | 306 | 9 | how to place the document url in text input? | I'm not quite sure how I should get the top URL and then place it in a text input? Here's what I've come up with, but no luck. Anyone have any ideas? Also, how could I make this text input non editable?
<script type="text/javascript">
var topURL = document.URL;
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
<input type="text" id="txtfld" onClick="SelectAll('txtfld');" style="width:200px" value ="topURL" />
I also tried `value ="document.URL"` in the value parameter and `value ="document.write(document.URL)"` | javascript | html | forms | url | null | null | open | how to place the document url in text input?
===
I'm not quite sure how I should get the top URL and then place it in a text input? Here's what I've come up with, but no luck. Anyone have any ideas? Also, how could I make this text input non editable?
<script type="text/javascript">
var topURL = document.URL;
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
<input type="text" id="txtfld" onClick="SelectAll('txtfld');" style="width:200px" value ="topURL" />
I also tried `value ="document.URL"` in the value parameter and `value ="document.write(document.URL)"` | 0 |
4,079,809 | 11/02/2010 16:26:53 | 469,497 | 10/07/2010 19:12:54 | 10 | 2 | JQuery cross-server calls with AJAX | I understand that this has been asked about before, but my issue is somewhat peculiar. I have two servers under different ports. I have Geoserver on port 8080 and Apache on port 80. I also have a proxy on Geoserver running allowing access to the Apache server. However, when I try to use `$('#phpContent').load('http://localhost:80/testing.html');` in a file from Geoserver, just for example, firebug shows me that the request is actually accepted as I get the message "GET http://10.0.102.11/testing.html 200 OK 108ms", but it is in red as if something is still going wrong. Not to mention the content does not display in the div :-/. I know my code is correct as I have tried the same thing all under the Apache server and everything works as expected. If it seems weird that I am using a page in Geoserver to make JQuery AJAX calls to Apache, it is because Apache can interpret php and Geoserver does not. Thanks for your time and I truly appreciate your feedback.
elshae | jquery | ajax | cross-domain | null | null | null | open | JQuery cross-server calls with AJAX
===
I understand that this has been asked about before, but my issue is somewhat peculiar. I have two servers under different ports. I have Geoserver on port 8080 and Apache on port 80. I also have a proxy on Geoserver running allowing access to the Apache server. However, when I try to use `$('#phpContent').load('http://localhost:80/testing.html');` in a file from Geoserver, just for example, firebug shows me that the request is actually accepted as I get the message "GET http://10.0.102.11/testing.html 200 OK 108ms", but it is in red as if something is still going wrong. Not to mention the content does not display in the div :-/. I know my code is correct as I have tried the same thing all under the Apache server and everything works as expected. If it seems weird that I am using a page in Geoserver to make JQuery AJAX calls to Apache, it is because Apache can interpret php and Geoserver does not. Thanks for your time and I truly appreciate your feedback.
elshae | 0 |
407,124 | 01/02/2009 15:33:27 | 42,404 | 12/02/2008 10:36:59 | 2,373 | 159 | Best practice for backing up a production MySQL database? | What is best practice for backing up a production MySQL database (i.e. on a live website and potentially being updated)?
Some goals I have in mind are:
- the DB backup should be an internally consistent snapshot
- not lock out the website while the backup is in progress
- (nice to have) incremental backups of changes only
- automated
- able to be done remotely
- secure | mysql | backup-strategies | null | null | null | 06/27/2012 13:09:41 | off topic | Best practice for backing up a production MySQL database?
===
What is best practice for backing up a production MySQL database (i.e. on a live website and potentially being updated)?
Some goals I have in mind are:
- the DB backup should be an internally consistent snapshot
- not lock out the website while the backup is in progress
- (nice to have) incremental backups of changes only
- automated
- able to be done remotely
- secure | 2 |
6,293,694 | 06/09/2011 13:39:39 | 23,569 | 09/29/2008 18:55:01 | 1,145 | 88 | SSIS Custom Component: Accessing Variables during Design Time | I am trying to read a package variable during design-time. I am able to do it during run-time fairly easily:
IDTSVariables variables = null;
pipelineComponent.VariableDispenser.LockForRead("MyVariable");
pipelineComponent.VariableDispenser.GetVariables(out variables);
But during design-time, I don't have a PipelineComponent and I can't find any object that will give me a VariableDispenser.
I've looked at the IDtsVariableService class, but it appears to only provide a helper UI to facilitate the creation of new variables -- I want to read an existing variable. | ssis | ssis-data-transformations | null | null | null | null | open | SSIS Custom Component: Accessing Variables during Design Time
===
I am trying to read a package variable during design-time. I am able to do it during run-time fairly easily:
IDTSVariables variables = null;
pipelineComponent.VariableDispenser.LockForRead("MyVariable");
pipelineComponent.VariableDispenser.GetVariables(out variables);
But during design-time, I don't have a PipelineComponent and I can't find any object that will give me a VariableDispenser.
I've looked at the IDtsVariableService class, but it appears to only provide a helper UI to facilitate the creation of new variables -- I want to read an existing variable. | 0 |
3,490,204 | 08/16/2010 02:12:16 | 421,298 | 08/16/2010 02:12:16 | 1 | 0 | WordPress vs ExpressionEngine: is EE worth the price? | I'm very new to coding (having only taken Web Development 101 at university aka 'OMG CSS u guise'), and I'm just beginning to realize that knowing HTML/CSS alone isn't good enough. I've decided that it would be best for me to learn the hell out of one CMS, because I'm not keen on learning a full programming language. Mainly I just want to be able to create websites *that load instantly* (think Sproutcore home page) that happen to use some kind of templating system to make things easier to administer over time.
I've looked into WordPress, and I know that it's a super popular platform for a reason, but it seems like most sites running WordPress don't load very quickly. I've read around a bit and it seems like the opinion of a lot of coders out there is that WP is a "heavy" platform. And, besides, I just recently viewed source on wordpress.org and found that they're not even running WordPress there! I mean come on!
I've also looked into ExpressionEngine, and I'm very impressed with the way things are done. It seems like after the learning curve it should be simple to use and highly extensible, but at $300 per commercial site license + the cost of add-ons, I'd like to be a bit more convinced of it's value. I know that AListApart, JasonSantaMaria.com, change.gov, iLounge, and [many more high quality, high traffic sites][1] run on ExpressionEngine, but I'm not totally convinced it's worth the price given that WP can surely do the job well enough in 90% of cases.
I would really appreciate your opinion.
Maybe I should just say F all this, and create my static pages with straight HTML/CSS, and then use a blogging platform like Tumblr or WordPress strictly for blog posts, as per Sproutcore?
Would love to hear your opinion.
[1]: http://www.hopstudios.com/blog/the_largest_expressionengine_sites/ | content-management-system | expressionengine | null | null | null | 04/11/2012 20:26:18 | not constructive | WordPress vs ExpressionEngine: is EE worth the price?
===
I'm very new to coding (having only taken Web Development 101 at university aka 'OMG CSS u guise'), and I'm just beginning to realize that knowing HTML/CSS alone isn't good enough. I've decided that it would be best for me to learn the hell out of one CMS, because I'm not keen on learning a full programming language. Mainly I just want to be able to create websites *that load instantly* (think Sproutcore home page) that happen to use some kind of templating system to make things easier to administer over time.
I've looked into WordPress, and I know that it's a super popular platform for a reason, but it seems like most sites running WordPress don't load very quickly. I've read around a bit and it seems like the opinion of a lot of coders out there is that WP is a "heavy" platform. And, besides, I just recently viewed source on wordpress.org and found that they're not even running WordPress there! I mean come on!
I've also looked into ExpressionEngine, and I'm very impressed with the way things are done. It seems like after the learning curve it should be simple to use and highly extensible, but at $300 per commercial site license + the cost of add-ons, I'd like to be a bit more convinced of it's value. I know that AListApart, JasonSantaMaria.com, change.gov, iLounge, and [many more high quality, high traffic sites][1] run on ExpressionEngine, but I'm not totally convinced it's worth the price given that WP can surely do the job well enough in 90% of cases.
I would really appreciate your opinion.
Maybe I should just say F all this, and create my static pages with straight HTML/CSS, and then use a blogging platform like Tumblr or WordPress strictly for blog posts, as per Sproutcore?
Would love to hear your opinion.
[1]: http://www.hopstudios.com/blog/the_largest_expressionengine_sites/ | 4 |
10,941,731 | 06/08/2012 00:36:01 | 1,443,429 | 06/08/2012 00:10:12 | 1 | 0 | Legacy VB6 App won't start | I inherited a headache. I have a small legacy (GUI) app that was developed 10 years ago and the VB6 source code is long gone. It works currently on a couple of old XP PCs and I was asked to see if I could get it working on Windows 7 64bit. Well… that was a no go, so I tried a 32bit version to verify that 64 wasn’t the issue and it didn’t work. So I then created an XP virtual machine and it didn’t work either. The issue is the same on all three environments. You double click the .exe and nothing is displayed but when you look under task manager, it’s there and pegging the CPU.
I downloaded Dependency Walker and it seems that all the required dlls and OCX files are there. Can anyone suggest anything else? I’m really at a loss here. Anything would be appreciated!
| vb6 | null | null | null | null | 06/08/2012 21:06:14 | off topic | Legacy VB6 App won't start
===
I inherited a headache. I have a small legacy (GUI) app that was developed 10 years ago and the VB6 source code is long gone. It works currently on a couple of old XP PCs and I was asked to see if I could get it working on Windows 7 64bit. Well… that was a no go, so I tried a 32bit version to verify that 64 wasn’t the issue and it didn’t work. So I then created an XP virtual machine and it didn’t work either. The issue is the same on all three environments. You double click the .exe and nothing is displayed but when you look under task manager, it’s there and pegging the CPU.
I downloaded Dependency Walker and it seems that all the required dlls and OCX files are there. Can anyone suggest anything else? I’m really at a loss here. Anything would be appreciated!
| 2 |
8,910,445 | 01/18/2012 12:57:07 | 1,156,259 | 01/18/2012 12:51:33 | 1 | 0 | Host named sitecollections search configuration | I want to host my sitecollection which is under a hosted web application
My doubt is
- how to configure search for hosted sitecollection
- If i deployed any wsp to webapplication does it affect to hosted sitecollection
- Do i need to add new content database to hosted sitecollection
- What about web.config file. Does it differ from webapplication to hosted sitecollection
Answers will be appriciated
thank you
--------------
:> | sharepoint2007 | null | null | null | null | 01/18/2012 19:17:13 | off topic | Host named sitecollections search configuration
===
I want to host my sitecollection which is under a hosted web application
My doubt is
- how to configure search for hosted sitecollection
- If i deployed any wsp to webapplication does it affect to hosted sitecollection
- Do i need to add new content database to hosted sitecollection
- What about web.config file. Does it differ from webapplication to hosted sitecollection
Answers will be appriciated
thank you
--------------
:> | 2 |
11,374,265 | 07/07/2012 10:36:25 | 636,660 | 02/27/2011 17:25:02 | 152 | 1 | How to make this kind of URL: mail.google.com | I don't know the name of this part of the domain name: **mail**.google.com
How do I implement something like that in my web application?
Please show me some tutorial for this. thank you | php | url | null | null | null | 07/07/2012 10:52:05 | off topic | How to make this kind of URL: mail.google.com
===
I don't know the name of this part of the domain name: **mail**.google.com
How do I implement something like that in my web application?
Please show me some tutorial for this. thank you | 2 |
5,599,823 | 04/08/2011 19:20:27 | 699,238 | 04/08/2011 19:20:27 | 1 | 0 | Filtering log file using COUNT, GROUP BY, ORDER BY MAX | Hi I have a machine that logs where guests and users navigate to and I'm trying to write a php script that will sort the logs and summarize for me the top five destinations people tend to go to i.e. what pages are visited the most.
So far this is what I have:
<?php
#### mysql connection #####
$db = mysql_connect("_","guest","_");
mysql_select_db(networkr) or die("Couldn't select the database");
echo "<table>";
$query = "SELECT uri LIMIT 5, COUNT(date) GROUP BY uri ORDER BY MAX(COUNT(date)), uri DESC";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo "Top 5 Destinations:". $row['COUNT(date)'] ." ". $row['uri'] .".";
echo "<br />";
}
echo "</table>";
?>
So I'm trying to get it to count all the times a specific page (uri) is visited using date as the unique identifier. Then I want it to list the counts in descending order from highest to lowest. Then only show the top five most visited pages.
The error I am getting when I open the php script in a web browser is:
> You have an error in your SQL syntax;
> check the manual that corresponds to
> your MySQL server version for the
> right syntax to use near 'COUNT(date)
> GROUP BY uri ORDER BY
> MAX(COUNT(date)), uri DESC' at line 1
I think its some kind of syntax error since I am not an expert at php. If anyone can help me run through the script for errors that would be most appreciated. | php | mysql | count | logging | group | null | open | Filtering log file using COUNT, GROUP BY, ORDER BY MAX
===
Hi I have a machine that logs where guests and users navigate to and I'm trying to write a php script that will sort the logs and summarize for me the top five destinations people tend to go to i.e. what pages are visited the most.
So far this is what I have:
<?php
#### mysql connection #####
$db = mysql_connect("_","guest","_");
mysql_select_db(networkr) or die("Couldn't select the database");
echo "<table>";
$query = "SELECT uri LIMIT 5, COUNT(date) GROUP BY uri ORDER BY MAX(COUNT(date)), uri DESC";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
echo "Top 5 Destinations:". $row['COUNT(date)'] ." ". $row['uri'] .".";
echo "<br />";
}
echo "</table>";
?>
So I'm trying to get it to count all the times a specific page (uri) is visited using date as the unique identifier. Then I want it to list the counts in descending order from highest to lowest. Then only show the top five most visited pages.
The error I am getting when I open the php script in a web browser is:
> You have an error in your SQL syntax;
> check the manual that corresponds to
> your MySQL server version for the
> right syntax to use near 'COUNT(date)
> GROUP BY uri ORDER BY
> MAX(COUNT(date)), uri DESC' at line 1
I think its some kind of syntax error since I am not an expert at php. If anyone can help me run through the script for errors that would be most appreciated. | 0 |
143,969 | 09/27/2008 16:40:39 | 4,358 | 09/03/2008 02:56:48 | 150 | 12 | Is there a S.M.A.R.T. Library for .NET or Java? | _I asked a somewhat [related](http://stackoverflow.com/questions/123575/how-to-get-the-temperature-of-motherboard-of-a-pc-and-other-hardware-statistics) question but I want it to make it more concrete and 'programming' oriented, so here it goes:_
Does any body know, if there is a **.NET**, **JAVA** or any other Framework, library, .jar file or what ever: to access [S.M.A.R.T.](http://en.wikipedia.org/wiki/Self-Monitoring,_Analysis,_and_Reporting_Technology) Statistics?
Thanks! | .net | java | hardware | s.m.a.r.t. | smart | 02/20/2012 19:08:46 | not constructive | Is there a S.M.A.R.T. Library for .NET or Java?
===
_I asked a somewhat [related](http://stackoverflow.com/questions/123575/how-to-get-the-temperature-of-motherboard-of-a-pc-and-other-hardware-statistics) question but I want it to make it more concrete and 'programming' oriented, so here it goes:_
Does any body know, if there is a **.NET**, **JAVA** or any other Framework, library, .jar file or what ever: to access [S.M.A.R.T.](http://en.wikipedia.org/wiki/Self-Monitoring,_Analysis,_and_Reporting_Technology) Statistics?
Thanks! | 4 |
11,050,327 | 06/15/2012 12:06:04 | 1,458,592 | 06/15/2012 11:54:09 | 1 | 0 | How to mirror video on iPhone? | In my app I need to get mirrored and rotated copies of video files on iPhone.
What the best and fastest way to do this? | objective-c | ios | video | null | null | 06/19/2012 11:47:12 | not a real question | How to mirror video on iPhone?
===
In my app I need to get mirrored and rotated copies of video files on iPhone.
What the best and fastest way to do this? | 1 |
7,696,199 | 10/08/2011 10:27:30 | 965,812 | 09/26/2011 20:42:36 | 1 | 1 | add click listener to entire appwidget | I have an appwidget and I want to add a click listener on the entire appwidget layout, not only on TextView ecc.
This is not working
remoteViews.setOnClickPendingIntent(R.layout.profile_widget_layout, pendingIntent);
How can I do? | android | layout | click | listener | appwidget | null | open | add click listener to entire appwidget
===
I have an appwidget and I want to add a click listener on the entire appwidget layout, not only on TextView ecc.
This is not working
remoteViews.setOnClickPendingIntent(R.layout.profile_widget_layout, pendingIntent);
How can I do? | 0 |
699,963 | 03/31/2009 04:15:21 | 18,615 | 09/19/2008 07:30:12 | 1,072 | 43 | Outlook 2003 Add-ins | I want to create a custom Add-in/plugin for Outlook 2003, to support integrated functionality with a task management system.
I am unable to find many good development resources for the same.
Can someone please explain Outlook 2003 architecure and development of a plugin.
Good links/resources are also welcome. | outlook2003 | outlook-object-model | null | null | null | null | open | Outlook 2003 Add-ins
===
I want to create a custom Add-in/plugin for Outlook 2003, to support integrated functionality with a task management system.
I am unable to find many good development resources for the same.
Can someone please explain Outlook 2003 architecure and development of a plugin.
Good links/resources are also welcome. | 0 |
7,557,694 | 09/26/2011 15:46:14 | 965,351 | 09/26/2011 15:40:06 | 1 | 0 | How do I connect to a sql database through sql developer? | So, I have a .sql file that I have downloaded and was wondering how I connect to it via sql developer which I have also downloaded. Do I need to create a connection with hostname and port etc? can I just connect to a file manually/directly or something?
Also, can anyone recommend a good database to practice/learn on for a beginner? Should I just download oracle 11g and play around with that?
Thanks. | sql | plsql | sql-developer | plsqldeveloper | null | 09/26/2011 22:45:13 | not a real question | How do I connect to a sql database through sql developer?
===
So, I have a .sql file that I have downloaded and was wondering how I connect to it via sql developer which I have also downloaded. Do I need to create a connection with hostname and port etc? can I just connect to a file manually/directly or something?
Also, can anyone recommend a good database to practice/learn on for a beginner? Should I just download oracle 11g and play around with that?
Thanks. | 1 |
6,318,024 | 06/11/2011 19:22:02 | 794,230 | 06/11/2011 19:22:02 | 1 | 0 | Web service creation | I am new to web services. I need to create a java web service very urgent I am using eclipse Helios ide, jdk 6, servlet and tomcat as a server. Do you think those are enough or I still nees to add something elase. Glad to hear your answer soon. | java-ee | null | null | null | null | 06/13/2011 15:56:19 | not a real question | Web service creation
===
I am new to web services. I need to create a java web service very urgent I am using eclipse Helios ide, jdk 6, servlet and tomcat as a server. Do you think those are enough or I still nees to add something elase. Glad to hear your answer soon. | 1 |
1,614,736 | 10/23/2009 17:03:44 | 131,134 | 06/30/2009 14:56:57 | 1,051 | 61 | Using JQuery to select some sibling elements | I'm new to jquery and trying to accomplish something. My HTML looks like:
<li>
<div class="yes"><input type="radio" name="Group 1"></div>
<div class="no"><input type="radio" name="Group 1"></div>
Group 1
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 1"></div>
<div class="no"><input type="radio" name="Item 1"></div>
Item 1
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 2"></div>
<div class="no"><input type="radio" name="Item 2"></div>
Item 2
</li>
<li>
<div class="yes"><input type="radio" name="Group 2"></div>
<div class="no"><input type="radio" name="Group 2"></div>
Group 2
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 3"></div>
<div class="no"><input type="radio" name="Item 3"></div>
Item 3
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 4"></div>
<div class="no"><input type="radio" name="Item 4"></div>
Item 4
</li>
It took a while to get the html right (I need the divs around the radio buttons for appearances), and now I'm moving on to the JQuery processing. Primarily, I need to propagate changes to Group 1 to all of its "child" items. I'm not really sure how to accomplish that using jquery (we use 1.1.3.1).
Any tips? | jquery | javascript | html | null | null | null | open | Using JQuery to select some sibling elements
===
I'm new to jquery and trying to accomplish something. My HTML looks like:
<li>
<div class="yes"><input type="radio" name="Group 1"></div>
<div class="no"><input type="radio" name="Group 1"></div>
Group 1
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 1"></div>
<div class="no"><input type="radio" name="Item 1"></div>
Item 1
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 2"></div>
<div class="no"><input type="radio" name="Item 2"></div>
Item 2
</li>
<li>
<div class="yes"><input type="radio" name="Group 2"></div>
<div class="no"><input type="radio" name="Group 2"></div>
Group 2
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 3"></div>
<div class="no"><input type="radio" name="Item 3"></div>
Item 3
</li>
<li style="padding-left:25px">
<div class="yes"><input type="radio" name="Item 4"></div>
<div class="no"><input type="radio" name="Item 4"></div>
Item 4
</li>
It took a while to get the html right (I need the divs around the radio buttons for appearances), and now I'm moving on to the JQuery processing. Primarily, I need to propagate changes to Group 1 to all of its "child" items. I'm not really sure how to accomplish that using jquery (we use 1.1.3.1).
Any tips? | 0 |
5,306,421 | 03/15/2011 01:05:20 | 659,814 | 03/15/2011 01:05:20 | 1 | 0 | accessing a servlet through a computer that is connected through switch | I am new to servlet.I made a servlet on a computer in a LAN connected network when I am accessing that servlet from another computer which is connected to the first thru a switch it is not able to access that I am specifying the IP address of that computer in the url is it possible to do that or I am wrong somewhere please help
thnx in advance!!!!!!!! | servlets | null | null | null | null | 03/15/2011 02:20:50 | not a real question | accessing a servlet through a computer that is connected through switch
===
I am new to servlet.I made a servlet on a computer in a LAN connected network when I am accessing that servlet from another computer which is connected to the first thru a switch it is not able to access that I am specifying the IP address of that computer in the url is it possible to do that or I am wrong somewhere please help
thnx in advance!!!!!!!! | 1 |
11,218,619 | 06/27/2012 02:33:54 | 1,369,159 | 05/02/2012 04:39:34 | 1 | 2 | init script not start when startup on ubuntu 12.04 | I creates init script with bash for unicorn to start, stop and restart named is unicorn . And I am trying to add it on startup or rc2.d with this command.
> update-rc.d unicorn defaults ..
and the result is :
> Adding system startup for /etc/init.d/unicorn ...
> /etc/rc0.d/K20unicorn -> ../init.d/unicorn /etc/rc1.d/K20unicorn ->
> ../init.d/unicorn /etc/rc6.d/K20unicorn -> ../init.d/unicorn
> /etc/rc2.d/S20unicorn -> ../init.d/unicorn /etc/rc3.d/S20unicorn ->
> ../init.d/unicorn /etc/rc4.d/S20unicorn -> ../init.d/unicorn
> /etc/rc5.d/S20unicorn -> ../init.d/unicorn
but when I try to reboot the machine my script is not working.. whats happen? anyone can tell me? Thanks .. :) | bash | shell | init | unicorn | null | 06/28/2012 11:12:07 | off topic | init script not start when startup on ubuntu 12.04
===
I creates init script with bash for unicorn to start, stop and restart named is unicorn . And I am trying to add it on startup or rc2.d with this command.
> update-rc.d unicorn defaults ..
and the result is :
> Adding system startup for /etc/init.d/unicorn ...
> /etc/rc0.d/K20unicorn -> ../init.d/unicorn /etc/rc1.d/K20unicorn ->
> ../init.d/unicorn /etc/rc6.d/K20unicorn -> ../init.d/unicorn
> /etc/rc2.d/S20unicorn -> ../init.d/unicorn /etc/rc3.d/S20unicorn ->
> ../init.d/unicorn /etc/rc4.d/S20unicorn -> ../init.d/unicorn
> /etc/rc5.d/S20unicorn -> ../init.d/unicorn
but when I try to reboot the machine my script is not working.. whats happen? anyone can tell me? Thanks .. :) | 2 |
6,277,513 | 06/08/2011 10:45:26 | 765,864 | 05/23/2011 10:53:18 | 35 | 0 | How to vlidate Textbox for emailid using Jquery? | How to vlidate Textbox for emailid using Jquery?Please reply soon.Many Thanks.
Regard's
Prosenjit Kesh | jquery | asp.net | null | null | null | null | open | How to vlidate Textbox for emailid using Jquery?
===
How to vlidate Textbox for emailid using Jquery?Please reply soon.Many Thanks.
Regard's
Prosenjit Kesh | 0 |
11,140,399 | 06/21/2012 14:27:51 | 1,144,510 | 01/12/2012 02:00:27 | 47 | 1 | Using AJAX in place of PHP | I have a simple form with an `<input type="text" name="album_id"/>` and `<input type="submit"/>`. When submitted, the input is passed to a PHP script in a seperate PHP file. However, I need it to output to a `<textarea>` or `<div>` on the same page as the input. I know this needs to be done with ajax, but I'm unfamiliar with that language and there don't know whether my script will work.
My PHP code:
require_once('simple_html_dom.php');
if (empty($_POST["album_id"])){
print "Whoops, you left the field empty!";
}
else
{
$html = file_get_html('http://domain.com/album/'.$_POST["album_id"]);
foreach($html->find('div#div_id') as $element)
echo $element;
} | php | ajax | null | null | null | 06/21/2012 14:40:49 | not a real question | Using AJAX in place of PHP
===
I have a simple form with an `<input type="text" name="album_id"/>` and `<input type="submit"/>`. When submitted, the input is passed to a PHP script in a seperate PHP file. However, I need it to output to a `<textarea>` or `<div>` on the same page as the input. I know this needs to be done with ajax, but I'm unfamiliar with that language and there don't know whether my script will work.
My PHP code:
require_once('simple_html_dom.php');
if (empty($_POST["album_id"])){
print "Whoops, you left the field empty!";
}
else
{
$html = file_get_html('http://domain.com/album/'.$_POST["album_id"]);
foreach($html->find('div#div_id') as $element)
echo $element;
} | 1 |
3,342,557 | 07/27/2010 10:11:37 | 403,243 | 07/27/2010 10:07:23 | 1 | 0 | How do you get/set content via javascript with the AJAX Control Toolkit HTML Editor ? | I'm using the AJAX Control toolkit HTML editor and have what I hope is a simple question. As the question title says - how do you get/set the content of the HTML editor via javascript ?
I have no problems accessing the server side content property - but how to do it client side ??!?
Any help gratefully received !
Thanks,
Tim. | ajaxcontroltoolkit | html-editor | null | null | null | null | open | How do you get/set content via javascript with the AJAX Control Toolkit HTML Editor ?
===
I'm using the AJAX Control toolkit HTML editor and have what I hope is a simple question. As the question title says - how do you get/set the content of the HTML editor via javascript ?
I have no problems accessing the server side content property - but how to do it client side ??!?
Any help gratefully received !
Thanks,
Tim. | 0 |
6,674,875 | 07/13/2011 06:25:30 | 840,092 | 07/12/2011 05:34:26 | 1 | 0 | How to get iPhone contacts in iPhone application | I want to get all the iPhone contacts in my iphone application.Is it possible?If so how?Anybody please help me. | iphone | null | null | null | null | null | open | How to get iPhone contacts in iPhone application
===
I want to get all the iPhone contacts in my iphone application.Is it possible?If so how?Anybody please help me. | 0 |
11,283,374 | 07/01/2012 15:44:46 | 1,154,542 | 01/17/2012 17:44:22 | 79 | 3 | where should inheritance classes be stored? | I want to create classes that can be inherited by other classes to use along my project.
i.e. i want to create a separate class for each Mail method, each class will implement differently the Compose method, and more Mail classes will be created in the future.
My question is - Where should I create these classes/interfaces? in the App_Code ? | asp.net | null | null | null | null | null | open | where should inheritance classes be stored?
===
I want to create classes that can be inherited by other classes to use along my project.
i.e. i want to create a separate class for each Mail method, each class will implement differently the Compose method, and more Mail classes will be created in the future.
My question is - Where should I create these classes/interfaces? in the App_Code ? | 0 |
4,667,641 | 01/12/2011 10:22:13 | 546,564 | 12/17/2010 21:42:00 | 34 | 0 | IValueConverter data binding | I am teaching myself some .NET programming and I’m currently trying to build a tag cloud control in WPF. The aim is to have 2 listboxes on a window with the first listbox displaying a list of “ContactLists” and the second listbox displaying the “labels” (or tags) associated with the ContactLists. For the labels the aim is to bind the font size to the itemCount using IValueConverter so if I have a particular label which appears several times in my collection this would be displayed in a bigger font in the labels listbox. Also I’m populating my controls from DB2 database.
So I have got as far as displaying the ContactLists and Labels in the correct listboxes I am just having some trouble with the binding. I am using a converter class which I took from a tutorial and was wondering if anyone can assist me to get this working. Many thanks - Ben
public class Label
{
public int LabelID { get; set; }
public string LabelName { get; set; }
}
public class ContactList
{
public string ContactListName { get; set; }
public List<Label> Labels { get; set; }
}
public class CountToFontSizeConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
const int minFontSize = 6;
const int maxFontSize = 38;
const int increment = 3;
int count = (int)value;
return ((minFontSize + count + increment) < maxFontSize) ? (minFontSize + count + increment) : maxFontSize;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
private void Window_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
//TODO: Add event handler implementation here.
ListCollectionView lcv = new ListCollectionView(myLabels);
lcv.GroupDescriptions.Add(new PropertyGroupDescription("LabelName"));
tagsList.ItemsSource = lcv.Groups;
}
<Window.Resources>
<local:CountToFontSizeConverter x:Key="CountToFontSizeConverter"/>
<Style x:Key="tagsStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Grid>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
<WrapPanel Orientation="Horizontal" Margin="2" IsItemsHost="true" Background="#FFFCF6F6"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="ContactsTemplate">
<WrapPanel>
<TextBlock TextWrapping="Wrap" Text="{Binding ContactListName, Mode=Default}"/>
</WrapPanel>
</DataTemplate>
<DataTemplate x:Key="TagsTemplate">
<WrapPanel>
<TextBlock Text="{Binding LabelName, Mode=Default}" TextWrapping="Wrap" FontSize="{Binding ItemCount, Converter={StaticResource CountToFontSizeConverter}, Mode=Default}" Foreground="#FF0D0AF7"/>
</WrapPanel>
</DataTemplate>
</Window.Resources>
<Grid x:Name="LayoutRoot" Background="#FFCBD5E6">
<ListBox x:Name="contactsList" SelectionMode="Multiple" Margin="7,8,0,7" ItemsSource="{Binding ContactLists, Mode=Default}" ItemTemplate="{DynamicResource ContactsTemplate}" HorizontalAlignment="Left" Width="254"/>
<ListBox x:Name="tagsList" Margin="293,8,8,8" ItemsSource="{Binding Labels, Mode=Default}" ItemTemplate="{StaticResource TagsTemplate}" Style="{StaticResource tagsStyle}" /> | c# | wpf | db2 | null | null | null | open | IValueConverter data binding
===
I am teaching myself some .NET programming and I’m currently trying to build a tag cloud control in WPF. The aim is to have 2 listboxes on a window with the first listbox displaying a list of “ContactLists” and the second listbox displaying the “labels” (or tags) associated with the ContactLists. For the labels the aim is to bind the font size to the itemCount using IValueConverter so if I have a particular label which appears several times in my collection this would be displayed in a bigger font in the labels listbox. Also I’m populating my controls from DB2 database.
So I have got as far as displaying the ContactLists and Labels in the correct listboxes I am just having some trouble with the binding. I am using a converter class which I took from a tutorial and was wondering if anyone can assist me to get this working. Many thanks - Ben
public class Label
{
public int LabelID { get; set; }
public string LabelName { get; set; }
}
public class ContactList
{
public string ContactListName { get; set; }
public List<Label> Labels { get; set; }
}
public class CountToFontSizeConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
const int minFontSize = 6;
const int maxFontSize = 38;
const int increment = 3;
int count = (int)value;
return ((minFontSize + count + increment) < maxFontSize) ? (minFontSize + count + increment) : maxFontSize;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
private void Window_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
//TODO: Add event handler implementation here.
ListCollectionView lcv = new ListCollectionView(myLabels);
lcv.GroupDescriptions.Add(new PropertyGroupDescription("LabelName"));
tagsList.ItemsSource = lcv.Groups;
}
<Window.Resources>
<local:CountToFontSizeConverter x:Key="CountToFontSizeConverter"/>
<Style x:Key="tagsStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Grid>
<Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
<WrapPanel Orientation="Horizontal" Margin="2" IsItemsHost="true" Background="#FFFCF6F6"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DataTemplate x:Key="ContactsTemplate">
<WrapPanel>
<TextBlock TextWrapping="Wrap" Text="{Binding ContactListName, Mode=Default}"/>
</WrapPanel>
</DataTemplate>
<DataTemplate x:Key="TagsTemplate">
<WrapPanel>
<TextBlock Text="{Binding LabelName, Mode=Default}" TextWrapping="Wrap" FontSize="{Binding ItemCount, Converter={StaticResource CountToFontSizeConverter}, Mode=Default}" Foreground="#FF0D0AF7"/>
</WrapPanel>
</DataTemplate>
</Window.Resources>
<Grid x:Name="LayoutRoot" Background="#FFCBD5E6">
<ListBox x:Name="contactsList" SelectionMode="Multiple" Margin="7,8,0,7" ItemsSource="{Binding ContactLists, Mode=Default}" ItemTemplate="{DynamicResource ContactsTemplate}" HorizontalAlignment="Left" Width="254"/>
<ListBox x:Name="tagsList" Margin="293,8,8,8" ItemsSource="{Binding Labels, Mode=Default}" ItemTemplate="{StaticResource TagsTemplate}" Style="{StaticResource tagsStyle}" /> | 0 |
9,089,840 | 02/01/2012 02:14:01 | 1,109,048 | 12/21/2011 03:12:22 | 1 | 0 | Generating intergers alphabetically | I am trying to generated integers using PHP's rand() function but starting from 1 instead of a random number.
<?php
$subject = 'The Web runs on source code';
$uri = substr(strtolower(str_replace(" ", "-", $subject)), 0, 20) . rand(0, 9000);
echo $uri; // prints the-web-runs-on-sour1179 or random integer
?>
How can i achieve this? Above is a set of functions i'm using. | php | integer | null | null | null | 02/01/2012 14:22:15 | not a real question | Generating intergers alphabetically
===
I am trying to generated integers using PHP's rand() function but starting from 1 instead of a random number.
<?php
$subject = 'The Web runs on source code';
$uri = substr(strtolower(str_replace(" ", "-", $subject)), 0, 20) . rand(0, 9000);
echo $uri; // prints the-web-runs-on-sour1179 or random integer
?>
How can i achieve this? Above is a set of functions i'm using. | 1 |
7,290,865 | 09/03/2011 02:58:30 | 906,042 | 08/22/2011 14:22:42 | 71 | 3 | Canvas, adding a control along with its children control elements | I have a shape that has a DP of type textbox. When I add the shape to a Canvas, is there a way to add the shape and the textbox together or do I have to do it separately. For example this is what I am doing right now:
mainCanvas.Children.Add(shape2);
mainCanvas.Children.Add.(shape2.textbox);
I want when I add the shape to add all DPs that are set to controls, since if I have more then one DP pointing to a control, I don't want to do it manually one by one. | wpf | canvas | dependency-properties | add | children | null | open | Canvas, adding a control along with its children control elements
===
I have a shape that has a DP of type textbox. When I add the shape to a Canvas, is there a way to add the shape and the textbox together or do I have to do it separately. For example this is what I am doing right now:
mainCanvas.Children.Add(shape2);
mainCanvas.Children.Add.(shape2.textbox);
I want when I add the shape to add all DPs that are set to controls, since if I have more then one DP pointing to a control, I don't want to do it manually one by one. | 0 |
8,147,410 | 11/16/2011 06:03:42 | 873,139 | 08/01/2011 16:38:39 | 93 | 3 | href path suffixes and refers to wrong location for resources | I use Spring Security, say I return request:
http://localhost:8080/Project/home/try - which is request an authorized user can only produce, so I return accessDenied page. The problem is that access denied page has href="resources/screen.css" and instead of going to look for screen.css in:
Project/resources/
it goes to
Project/home/resources/screen.css which is obviously non existent location
so I am left with unformatted page. Can I still use relative paths at this point? or I have to write absolute path(which is not what I want to do)?
JSP or Spring tags formatting solution are also very welcome! | resources | path | href | null | null | null | open | href path suffixes and refers to wrong location for resources
===
I use Spring Security, say I return request:
http://localhost:8080/Project/home/try - which is request an authorized user can only produce, so I return accessDenied page. The problem is that access denied page has href="resources/screen.css" and instead of going to look for screen.css in:
Project/resources/
it goes to
Project/home/resources/screen.css which is obviously non existent location
so I am left with unformatted page. Can I still use relative paths at this point? or I have to write absolute path(which is not what I want to do)?
JSP or Spring tags formatting solution are also very welcome! | 0 |
9,990,314 | 04/03/2012 09:12:43 | 1,298,115 | 03/28/2012 12:08:40 | 1 | 0 | <how to deploy a project folder in tomcat 5.5> | i an using tomcat5.5 jdk 1.5. want to deploy my project folder on tomcat's webapps folder bt i am getting error"The requested resource (/nic15/) is not available." i dont want to use .war file please help | tomcat | null | null | null | null | 04/16/2012 04:16:11 | not a real question | <how to deploy a project folder in tomcat 5.5>
===
i an using tomcat5.5 jdk 1.5. want to deploy my project folder on tomcat's webapps folder bt i am getting error"The requested resource (/nic15/) is not available." i dont want to use .war file please help | 1 |
4,176 | 08/07/2008 00:27:02 | 145 | 08/02/2008 14:40:17 | 164 | 6 | Why Should I Learn Ruby? | So far, my favorite programming language has been python, hands down, but I've been hearing a number of good things about ruby from various people I hold in good regard, so let me put it to you:
- _Why should I learn Ruby?_
Please <u>**do not**</u> post something to the effect of "Because it is awesome" or "It's better than language X because..." I don't want a war on my hands. **I'm looking for concrete examples of what makes Ruby a useful language to code in**. | ruby | null | null | null | null | 11/03/2010 12:58:01 | not a real question | Why Should I Learn Ruby?
===
So far, my favorite programming language has been python, hands down, but I've been hearing a number of good things about ruby from various people I hold in good regard, so let me put it to you:
- _Why should I learn Ruby?_
Please <u>**do not**</u> post something to the effect of "Because it is awesome" or "It's better than language X because..." I don't want a war on my hands. **I'm looking for concrete examples of what makes Ruby a useful language to code in**. | 1 |
679,444 | 03/24/2009 22:04:22 | 76,885 | 03/11/2009 20:28:26 | 13 | 2 | Where should I store data on a VMWare Server (or any virtual machine) install? | I have a Linux server at home that runs VMWare Server. I have one virtual machine for my web server, another for my zimbra server, another for my mysql server, and another that runs windows xp for testing.
My problem is where to store the data. Web files, email files, mysql, etc?
Which of these scenarios are the best?
* Each virtual machine stores it's own data on it's own virtual hard disk
* Create a new virtual machine for data storage and use Samba or NFS to share
* Use Samba or NFS on the host machine to share the data
* something else i haven't thought of yet
I know that storing Mysql data files remotely via NFS or Samba is a bad thing but I would like to keep my data consolidated together. (Or maybe i'm on crack for thinking that)
Anyway, please set me straight! Thanks. | vmware-server | null | null | null | null | 03/24/2009 22:19:51 | off topic | Where should I store data on a VMWare Server (or any virtual machine) install?
===
I have a Linux server at home that runs VMWare Server. I have one virtual machine for my web server, another for my zimbra server, another for my mysql server, and another that runs windows xp for testing.
My problem is where to store the data. Web files, email files, mysql, etc?
Which of these scenarios are the best?
* Each virtual machine stores it's own data on it's own virtual hard disk
* Create a new virtual machine for data storage and use Samba or NFS to share
* Use Samba or NFS on the host machine to share the data
* something else i haven't thought of yet
I know that storing Mysql data files remotely via NFS or Samba is a bad thing but I would like to keep my data consolidated together. (Or maybe i'm on crack for thinking that)
Anyway, please set me straight! Thanks. | 2 |
5,618 | 08/08/2008 03:38:38 | 668 | 08/07/2008 16:05:06 | 8 | 0 | Best ajax library for Sharepoint | For developing Windows Sharepoint Service application, what is the best ajax library available now? I'm thinking of free, customizable, and easy deployment, and its compatible with sharepoint, meaning it can run in 'quirks' mode. | .net | ajax | sharepoint | null | null | 09/14/2011 21:52:00 | not constructive | Best ajax library for Sharepoint
===
For developing Windows Sharepoint Service application, what is the best ajax library available now? I'm thinking of free, customizable, and easy deployment, and its compatible with sharepoint, meaning it can run in 'quirks' mode. | 4 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.