PostId int64 13 11.8M | PostCreationDate stringlengths 19 19 | OwnerUserId int64 3 1.57M | OwnerCreationDate stringlengths 10 19 | ReputationAtPostCreation int64 -33 210k | OwnerUndeletedAnswerCountAtPostTime int64 0 5.77k | Title stringlengths 10 250 | BodyMarkdown stringlengths 12 30k | Tag1 stringlengths 1 25 ⌀ | Tag2 stringlengths 1 25 ⌀ | Tag3 stringlengths 1 25 ⌀ | Tag4 stringlengths 1 25 ⌀ | Tag5 stringlengths 1 25 ⌀ | PostClosedDate stringlengths 19 19 ⌀ | OpenStatus stringclasses 5 values | unified_texts stringlengths 47 30.1k | OpenStatus_id int64 0 4 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,910,198 | 05/06/2011 10:41:41 | 644,384 | 03/04/2011 08:51:37 | 21 | 1 | game programming | probably this question have been asked a million times i use c++ but i want to go into game programming,which good game engine uses c++ for scripting thank you | game-engine | null | null | null | null | 05/06/2011 11:31:02 | off topic | game programming
===
probably this question have been asked a million times i use c++ but i want to go into game programming,which good game engine uses c++ for scripting thank you | 2 |
11,729,600 | 07/30/2012 21:07:33 | 856,942 | 07/21/2011 22:11:53 | 917 | 89 | Heroku and mongoHQ: Connection failed | I have the following environment variable on Heroku :
MONGOHQ_URL: mongodb://heroku:password%40mongohq%2Estaff%2Ecom:10056/app6186345
Originally the error was :
Database name cannot contain '.'
I escaped '.' and '@'and I still have the same result, a connection failed but with the message :
[Error: failed to connect to [heroku:27017]]
What am I doing wrong?
When I checked the documentation about mongoHQ, nothing is said about escaping caracters or something equivalent.
| mongodb | heroku | mongoose | mongohq | null | null | open | Heroku and mongoHQ: Connection failed
===
I have the following environment variable on Heroku :
MONGOHQ_URL: mongodb://heroku:password%40mongohq%2Estaff%2Ecom:10056/app6186345
Originally the error was :
Database name cannot contain '.'
I escaped '.' and '@'and I still have the same result, a connection failed but with the message :
[Error: failed to connect to [heroku:27017]]
What am I doing wrong?
When I checked the documentation about mongoHQ, nothing is said about escaping caracters or something equivalent.
| 0 |
1,818,539 | 11/30/2009 08:34:04 | 430,254 | 12/01/2008 08:35:21 | 1,458 | 40 | How to pass controller's ModelState to my service constructor with Autofac? | I have a wrapper on ModelStateDictionary which all my services accept. Is it possible to configure the autofac to inject the controller ModelStateDictionary into the constructor of the wrapper and then inject it into service constructor?
//code
public class ModelValidation : IModelValidation {
public ModelValidation(ModelStateDictionary msd){...}
..
..
}
public class CustomerService{
public CustomerService(IModelValidation mv){...}
..
}
Thanks | asp.net-mvc | autofac | null | null | null | null | open | How to pass controller's ModelState to my service constructor with Autofac?
===
I have a wrapper on ModelStateDictionary which all my services accept. Is it possible to configure the autofac to inject the controller ModelStateDictionary into the constructor of the wrapper and then inject it into service constructor?
//code
public class ModelValidation : IModelValidation {
public ModelValidation(ModelStateDictionary msd){...}
..
..
}
public class CustomerService{
public CustomerService(IModelValidation mv){...}
..
}
Thanks | 0 |
2,978,205 | 06/04/2010 22:30:18 | 51,197 | 01/03/2009 17:39:24 | 2,774 | 72 | Python: Mechanize and BeautifulSoup not working on a shared hosting computer | I am writing a small site decorator to [make my local airport site work with standard HTML][1].
On my local computer, I use Python's `mechanize` and `BeautifulSoup` packages to scrape and parse the site contents, and everything seems to work just fine. I have installed these packages via `apt-get`.
On my shared hosting site (at [DreamHost][2]) I have downloaded the `.tar.gz` files, extracted the packages, renamed the directories (e.g., from `BeautifulSoup-3.1.0.tar.gz` to `BeautifulSoup`) and tried to run the command.
I've got a bizarre error with BeautifulSoup; I don't know if it's about an older version of Python on Dreamhost, about directory names, or other reason.
[sanjose]$ python
Python 2.4.4 (#2, Jan 24 2010, 11:50:13)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from BeautifulSoup import BeautifulSoup
>>> import mechanize
>>> url='http://www.iaa.gov.il/Rashat/he-IL/Airports/BenGurion/informationForTravelers/OnlineFlights.aspx?flightsType=arr'
>>> br=mechanize.Browser()
>>> br.addheaders = [('User-agent', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)')]
>>> r=br.open(url)
>>> html=r.read()
>>> type(html)
<type 'str'>
I've done this to show that the input is indeed a string. Now let's run the command that works in my local computer:
>>> soup = BeautifulSoup.BeautifulSoup(html)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1493, in __init__
BeautifulStoneSoup.__init__(self, *args, **kwargs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1224, in __init__
self._feed(isHTML=isHTML)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1257, in _feed
self.builder.feed(markup)
File "/usr/lib/python2.4/HTMLParser.py", line 108, in feed
self.goahead(0)
File "/usr/lib/python2.4/HTMLParser.py", line 148, in goahead
k = self.parse_starttag(i)
File "/usr/lib/python2.4/HTMLParser.py", line 268, in parse_starttag
self.handle_starttag(tag, attrs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1011, in handle_starttag
self.soup.unknown_starttag(name, attrs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1408, in unknown_starttag
tag = Tag(self, name, attrs, self.currentTag, self.previous)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 525, in __init__
self.attrs = map(convert, self.attrs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 524, in <lambda>
val))
File "/usr/lib/python2.4/sre.py", line 142, in sub
return _compile(pattern, 0).sub(repl, string, count)
TypeError: expected string or buffer
Any ideas?
Adam
[1]: http://stackoverflow.com/questions/2935658/beautifulsoup-get-the-contents-of-a-specific-table
[2]: http://dreamhost.com | python | beautifulsoup | shared-hosting | null | null | null | open | Python: Mechanize and BeautifulSoup not working on a shared hosting computer
===
I am writing a small site decorator to [make my local airport site work with standard HTML][1].
On my local computer, I use Python's `mechanize` and `BeautifulSoup` packages to scrape and parse the site contents, and everything seems to work just fine. I have installed these packages via `apt-get`.
On my shared hosting site (at [DreamHost][2]) I have downloaded the `.tar.gz` files, extracted the packages, renamed the directories (e.g., from `BeautifulSoup-3.1.0.tar.gz` to `BeautifulSoup`) and tried to run the command.
I've got a bizarre error with BeautifulSoup; I don't know if it's about an older version of Python on Dreamhost, about directory names, or other reason.
[sanjose]$ python
Python 2.4.4 (#2, Jan 24 2010, 11:50:13)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from BeautifulSoup import BeautifulSoup
>>> import mechanize
>>> url='http://www.iaa.gov.il/Rashat/he-IL/Airports/BenGurion/informationForTravelers/OnlineFlights.aspx?flightsType=arr'
>>> br=mechanize.Browser()
>>> br.addheaders = [('User-agent', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)')]
>>> r=br.open(url)
>>> html=r.read()
>>> type(html)
<type 'str'>
I've done this to show that the input is indeed a string. Now let's run the command that works in my local computer:
>>> soup = BeautifulSoup.BeautifulSoup(html)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1493, in __init__
BeautifulStoneSoup.__init__(self, *args, **kwargs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1224, in __init__
self._feed(isHTML=isHTML)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1257, in _feed
self.builder.feed(markup)
File "/usr/lib/python2.4/HTMLParser.py", line 108, in feed
self.goahead(0)
File "/usr/lib/python2.4/HTMLParser.py", line 148, in goahead
k = self.parse_starttag(i)
File "/usr/lib/python2.4/HTMLParser.py", line 268, in parse_starttag
self.handle_starttag(tag, attrs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1011, in handle_starttag
self.soup.unknown_starttag(name, attrs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 1408, in unknown_starttag
tag = Tag(self, name, attrs, self.currentTag, self.previous)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 525, in __init__
self.attrs = map(convert, self.attrs)
File "/home/adamatan/matan.name/natbug/BeautifulSoup/BeautifulSoup.py", line 524, in <lambda>
val))
File "/usr/lib/python2.4/sre.py", line 142, in sub
return _compile(pattern, 0).sub(repl, string, count)
TypeError: expected string or buffer
Any ideas?
Adam
[1]: http://stackoverflow.com/questions/2935658/beautifulsoup-get-the-contents-of-a-specific-table
[2]: http://dreamhost.com | 0 |
9,958,224 | 03/31/2012 17:49:12 | 1,297,720 | 03/28/2012 09:18:31 | 9 | 0 | How can i make a Drawing app on my app? | Hey i'm making a drawing app an i need to make a most crucial part, the drawing part of the app?
only i have no idea how to make that. i tried the fingerpaint.java (from android) to learn but that screen is divided up into 4 pieces which are flipped. can someone please explain me how to make such a drawing thingy? | android | drawing | null | null | null | 04/01/2012 03:39:20 | not a real question | How can i make a Drawing app on my app?
===
Hey i'm making a drawing app an i need to make a most crucial part, the drawing part of the app?
only i have no idea how to make that. i tried the fingerpaint.java (from android) to learn but that screen is divided up into 4 pieces which are flipped. can someone please explain me how to make such a drawing thingy? | 1 |
4,935,457 | 02/08/2011 16:15:52 | 520,300 | 11/25/2010 14:50:39 | 3 | 0 | Page With Mixed Content? | Is there a way to check and prevent a form from being displayed if the page loads with mixed content? thus meaning the page isnt using the ssl? | php | ssl | null | null | null | null | open | Page With Mixed Content?
===
Is there a way to check and prevent a form from being displayed if the page loads with mixed content? thus meaning the page isnt using the ssl? | 0 |
6,343,515 | 06/14/2011 12:34:01 | 160,820 | 08/21/2009 14:09:57 | 686 | 21 | code optimizing. Can you please suggest how to imprive this code? | <select name="checkInDay" tabindex="3" onchange="calcDay();" class="ffe selectform" id="checkInDate">
<?php for($i=1;$i<=31;$i++) {
$value = $i < 10 ? "0".$i : $i;
?>
<option value="<?= $value ?>" <?php if($i == 12) {?> selected="selected" <?php } ?> > <?= $i ?> </option>
<?php } ?>
</select>
Thanks in advance. | php | null | null | null | null | 06/14/2011 12:51:56 | off topic | code optimizing. Can you please suggest how to imprive this code?
===
<select name="checkInDay" tabindex="3" onchange="calcDay();" class="ffe selectform" id="checkInDate">
<?php for($i=1;$i<=31;$i++) {
$value = $i < 10 ? "0".$i : $i;
?>
<option value="<?= $value ?>" <?php if($i == 12) {?> selected="selected" <?php } ?> > <?= $i ?> </option>
<?php } ?>
</select>
Thanks in advance. | 2 |
5,321,368 | 03/16/2011 05:18:35 | 644,199 | 03/04/2011 05:58:13 | 1 | 0 | what is ado.net | i am join a new company he ask me a i am use ado.net. tell me a use of ado.net and which is the special purpose to use. | ado.net | null | null | null | null | 04/07/2011 23:51:54 | not a real question | what is ado.net
===
i am join a new company he ask me a i am use ado.net. tell me a use of ado.net and which is the special purpose to use. | 1 |
9,360,632 | 02/20/2012 11:48:06 | 1,180,477 | 01/31/2012 13:58:10 | 1 | 1 | VievSwitcher and ListView | I have layout
<ViewSwitcher>
<LinearLayout>
<ListView />
</LinearLayout>
<LinearLayout>
<ListView />
</LinearLayout>
</ViewSwitcher>
But when I switch ViewSwitcher(by onTouchListener) the onItemClick listener of ListViev in my layout responds too. I do not need that on switching. How to fix it? | android-layout | android-listview | viewswitcher | null | null | null | open | VievSwitcher and ListView
===
I have layout
<ViewSwitcher>
<LinearLayout>
<ListView />
</LinearLayout>
<LinearLayout>
<ListView />
</LinearLayout>
</ViewSwitcher>
But when I switch ViewSwitcher(by onTouchListener) the onItemClick listener of ListViev in my layout responds too. I do not need that on switching. How to fix it? | 0 |
5,450,574 | 03/27/2011 16:32:41 | 679,116 | 03/27/2011 16:32:41 | 1 | 0 | working on a proj in neural network | Is it necessary to take training set in binary only for neural network? | java | null | null | null | null | 03/28/2011 12:30:08 | not a real question | working on a proj in neural network
===
Is it necessary to take training set in binary only for neural network? | 1 |
8,552,327 | 12/18/2011 14:20:15 | 1,104,555 | 12/18/2011 14:15:49 | 1 | 0 | How to Read/Decode QR Code without camera | How to Read/Decode QR Code without camera
i want to read QR code with my storage picture QR code
how to read and decode it
i try Zxing but it can read camera decode
thank you | source | qr-code | null | null | null | 12/18/2011 16:21:26 | not a real question | How to Read/Decode QR Code without camera
===
How to Read/Decode QR Code without camera
i want to read QR code with my storage picture QR code
how to read and decode it
i try Zxing but it can read camera decode
thank you | 1 |
10,409,856 | 05/02/2012 08:01:25 | 1,369,414 | 05/02/2012 07:33:53 | 1 | 0 | what software tools to choose for website which works on relational database | Can any one suggest which tolls to use for developing a website which has relational database as back-end .
We want to use emc corporations tools.
for example
Online atmos
springs frame work which supports jdbc
But we don't know whether we can use springs for to developing front-end which is website. | database | spring | null | null | null | 05/03/2012 12:38:22 | not constructive | what software tools to choose for website which works on relational database
===
Can any one suggest which tolls to use for developing a website which has relational database as back-end .
We want to use emc corporations tools.
for example
Online atmos
springs frame work which supports jdbc
But we don't know whether we can use springs for to developing front-end which is website. | 4 |
6,898,489 | 08/01/2011 12:35:15 | 844,519 | 07/14/2011 12:07:23 | 10 | 0 | Switching the Binding Source of DataGrid in WPF | In my view there is a Datagrid and its itemsourse is binding from Filelist from 3 different folders.
IS it possible to switch the binding source programatically.
Eg:For First click ItemsSource="{Binding FileList}
And for Second Click ItemsSource="{Binding FileList1}
Is it possible in Same Datagrid.?I'm Following MVVM Prism
Thanks in advance.. | wpf | wpf-binding | wpfdatagrid | null | null | null | open | Switching the Binding Source of DataGrid in WPF
===
In my view there is a Datagrid and its itemsourse is binding from Filelist from 3 different folders.
IS it possible to switch the binding source programatically.
Eg:For First click ItemsSource="{Binding FileList}
And for Second Click ItemsSource="{Binding FileList1}
Is it possible in Same Datagrid.?I'm Following MVVM Prism
Thanks in advance.. | 0 |
3,660,765 | 09/07/2010 16:49:44 | 341,293 | 05/14/2010 13:57:57 | 128 | 5 | Load Test software | I know nothing about Load Test Software.
Is Visual Studio Load Test Virtual User Pack 2010 any good?
| testing | load | null | null | null | 09/08/2010 00:45:22 | not constructive | Load Test software
===
I know nothing about Load Test Software.
Is Visual Studio Load Test Virtual User Pack 2010 any good?
| 4 |
3,826,421 | 09/29/2010 22:40:23 | 462,316 | 09/29/2010 22:40:22 | 1 | 0 | How to write a python program to calculate pi | The German mathematician Gottfried Leibniz developed the following method to approximate the value of pi:
pi/4 = 1- 1/3 + 1/5 - 1/7 + 1/9 - 1/11 ...
Write a program that allows the user to specify the number of iterations used in this approximation and that displays the resulting value for pi.
| python | null | null | null | null | 06/06/2012 14:39:07 | not a real question | How to write a python program to calculate pi
===
The German mathematician Gottfried Leibniz developed the following method to approximate the value of pi:
pi/4 = 1- 1/3 + 1/5 - 1/7 + 1/9 - 1/11 ...
Write a program that allows the user to specify the number of iterations used in this approximation and that displays the resulting value for pi.
| 1 |
10,632,972 | 05/17/2012 09:25:41 | 637,515 | 02/28/2011 10:40:03 | 671 | 19 | JQuery/Spring: Posting json object to spring controller not working | This is my spring controller
@RequestMapping(value = "/app/{appId}/save.html",method=RequestMethod.POST)
public @ResponseBody String myFunction
(@PathVariable("appId") String id, @RequestBody Map<String, String> data1) {
return "hello";
}
This is my ajax request
$.ajax({
type : 'POST',
url : '/app/${param.appID}/save.html',
data : JSON.stringify(myJsonData),
dataType : "json",
success : function(data, textStatus,
xhr) {
var response = xhr.responseText;
if (response !== "hello") {
alert('sad');
} else {
alert('happy');
}
}
});
The problem is , this request never reaches the controller and gets stuck .
If I remove data and data1, things work fine. Can some help me with what am I doing wrong.
| jquery | ajax | spring | web | null | null | open | JQuery/Spring: Posting json object to spring controller not working
===
This is my spring controller
@RequestMapping(value = "/app/{appId}/save.html",method=RequestMethod.POST)
public @ResponseBody String myFunction
(@PathVariable("appId") String id, @RequestBody Map<String, String> data1) {
return "hello";
}
This is my ajax request
$.ajax({
type : 'POST',
url : '/app/${param.appID}/save.html',
data : JSON.stringify(myJsonData),
dataType : "json",
success : function(data, textStatus,
xhr) {
var response = xhr.responseText;
if (response !== "hello") {
alert('sad');
} else {
alert('happy');
}
}
});
The problem is , this request never reaches the controller and gets stuck .
If I remove data and data1, things work fine. Can some help me with what am I doing wrong.
| 0 |
2,343,369 | 02/26/2010 17:06:37 | 151,929 | 08/06/2009 17:17:09 | 36 | 1 | Entity Framework Persisting local scope variable?!?!? | Hello guys I have the following method:
var usuario;
usuario = UniapontaService.GetUsuarioUniapontaPlanejamentoEstrategico(x => x.IdUsuario == VWUsuarioUniaponta.IdUsuario &&
x.PlanejamentoEstrategico.IdPlanejamentoEstrategico == HorarioTrabalhoCorrente.PlanejamentoEstrategico.IdPlanejamentoEstrategico);
TxtTotalHorasMes.Text = usuario.QuantidadeHorasDisponivelMes.ToString();
usuario = null;
When executes this method, and then executes it again it seem that the EF or something is caching the value of the first query:
Exemple: go though the method, query for usuario that is 25, in that then i set null (that was a test) later on in the execution even changing that value in database, when it passes in this method again the variable is still 25....and when I save changes in another method it tries to save usuario from another method. This seems wrong because the variable scope is local and not global
The Problem is, when the method is over it should not destroy that variable?
How I can solve this??
| entity-framework | c# | linq | null | null | null | open | Entity Framework Persisting local scope variable?!?!?
===
Hello guys I have the following method:
var usuario;
usuario = UniapontaService.GetUsuarioUniapontaPlanejamentoEstrategico(x => x.IdUsuario == VWUsuarioUniaponta.IdUsuario &&
x.PlanejamentoEstrategico.IdPlanejamentoEstrategico == HorarioTrabalhoCorrente.PlanejamentoEstrategico.IdPlanejamentoEstrategico);
TxtTotalHorasMes.Text = usuario.QuantidadeHorasDisponivelMes.ToString();
usuario = null;
When executes this method, and then executes it again it seem that the EF or something is caching the value of the first query:
Exemple: go though the method, query for usuario that is 25, in that then i set null (that was a test) later on in the execution even changing that value in database, when it passes in this method again the variable is still 25....and when I save changes in another method it tries to save usuario from another method. This seems wrong because the variable scope is local and not global
The Problem is, when the method is over it should not destroy that variable?
How I can solve this??
| 0 |
1,862,248 | 12/07/2009 19:17:47 | 202,875 | 11/04/2009 19:14:43 | 88 | 8 | Xcode save code folding? | I know it's not directly related to programming, but what better place then stackoverflow right?
So code folding is an awesome feature which I love, but does anyone know if there is a way to get Xcode to remember where you have certain sections collapsed whenever you open a file?
BTW, I'm coding ruby on rails using git version control. | xcode | code-folding | code-formatting | ruby-on-rails | osx | null | open | Xcode save code folding?
===
I know it's not directly related to programming, but what better place then stackoverflow right?
So code folding is an awesome feature which I love, but does anyone know if there is a way to get Xcode to remember where you have certain sections collapsed whenever you open a file?
BTW, I'm coding ruby on rails using git version control. | 0 |
9,534,031 | 03/02/2012 13:22:35 | 770,127 | 05/25/2011 18:26:13 | 752 | 24 | Expected an assignment or function call and instead saw an expression | I'm totally cool with this [JSLint][1] error. How can I tolerate it? Is there a flag or checkbox for it?
You get it when you do stuff like:
v && arr.push(v);
as opposed to:
if (v) {
arr.push(v);
}
Both do the same exact thing.
[1]: http://jslint.com/ | javascript | jslint | null | null | null | null | open | Expected an assignment or function call and instead saw an expression
===
I'm totally cool with this [JSLint][1] error. How can I tolerate it? Is there a flag or checkbox for it?
You get it when you do stuff like:
v && arr.push(v);
as opposed to:
if (v) {
arr.push(v);
}
Both do the same exact thing.
[1]: http://jslint.com/ | 0 |
8,497,776 | 12/13/2011 23:35:29 | 819,276 | 01/08/2011 14:57:18 | 58 | 2 | Mac OS X Terminal getting wrong SSH path? | In Mac OS X terminal, I am logging in to a remote server via ssh with a dsa key pair. When I execute this command:
ssh -v -l root -p 22 [remote ip address]
I see in the debug code that Terminal is looking for my key in
/var/root/.ssh/
The actual path is:
/Users/danny/.ssh/
If I execute this command:
ssh -v -i /Users/danny/.ssh/inno_dsa -l root -p [remote IP address]
... then I get in fine.
So my question is there a way to tell terminal to autmatically look in /Users/danny/.ssh/ so I don't always have to explicitly specify the path?
| shell | ssh | terminal | null | null | 02/08/2012 18:24:20 | off topic | Mac OS X Terminal getting wrong SSH path?
===
In Mac OS X terminal, I am logging in to a remote server via ssh with a dsa key pair. When I execute this command:
ssh -v -l root -p 22 [remote ip address]
I see in the debug code that Terminal is looking for my key in
/var/root/.ssh/
The actual path is:
/Users/danny/.ssh/
If I execute this command:
ssh -v -i /Users/danny/.ssh/inno_dsa -l root -p [remote IP address]
... then I get in fine.
So my question is there a way to tell terminal to autmatically look in /Users/danny/.ssh/ so I don't always have to explicitly specify the path?
| 2 |
11,035,883 | 06/14/2012 14:59:26 | 1,447,591 | 06/10/2012 17:01:42 | 11 | 0 | I have a class in C# but don't know how to add/execute it into a project C# | I finally got the solution for WatiN to get it working. The ideea is that I have the WatiN function in a class, and I can't execute it from there.
I have a class, with a function in it. Like this:
public void SearchForWatiNOnGoogle()
{
using (var browser = new IE("http://www.google.com"))
{
browser.TextField(Find.ByName("q")).TypeText("WatiN");
browser.Button(Find.ByName("btnG")).Click();
Assert.IsTrue(browser.ContainsText("WatiN"));
}
}
I wanna make a new project (Form) with a single button. I want the function SearchForWatiNOnGoogle() to be executed when I click the button.
I know it's really simple, searched on google, but didn't found the right answer.
Thanks guys again :) | c# | watin | null | null | null | 06/15/2012 00:18:45 | not a real question | I have a class in C# but don't know how to add/execute it into a project C#
===
I finally got the solution for WatiN to get it working. The ideea is that I have the WatiN function in a class, and I can't execute it from there.
I have a class, with a function in it. Like this:
public void SearchForWatiNOnGoogle()
{
using (var browser = new IE("http://www.google.com"))
{
browser.TextField(Find.ByName("q")).TypeText("WatiN");
browser.Button(Find.ByName("btnG")).Click();
Assert.IsTrue(browser.ContainsText("WatiN"));
}
}
I wanna make a new project (Form) with a single button. I want the function SearchForWatiNOnGoogle() to be executed when I click the button.
I know it's really simple, searched on google, but didn't found the right answer.
Thanks guys again :) | 1 |
9,742,810 | 03/16/2012 18:42:30 | 482,819 | 10/21/2010 09:51:42 | 687 | 19 | Finding three parts of string in Python using regex | I have three a string that is the concatenation of three components:
- one word from list 1 (includes an empty string)
- one word from list 2
- one word from list 3 (includes an empty string)
Lists 1, 2 and 3 can be up to 5000 elements. Elements in one list are not in the others (except of the empty string). However, there are words that can be part of other words.
I am looking for an efficient way to find the three components. Right now I am doing the following:
for word in list2:
if word in long_word:
try:
[bef, aft] = s.split(word)
except ValueError: # too many values to unpack
continue
if bef in list1 and aft in list3:
print('Found: {}, {}, {}'.format(bef, word, aft))
break
else:
print('Not found')
I wonder if there is a better way. I thought about using the pipe in a regex. But it seems that the number of alternatives are too big as I get: OverflowError: regular expression code size limit exceeded.
Thanks, | python | regex | tokenize | null | null | null | open | Finding three parts of string in Python using regex
===
I have three a string that is the concatenation of three components:
- one word from list 1 (includes an empty string)
- one word from list 2
- one word from list 3 (includes an empty string)
Lists 1, 2 and 3 can be up to 5000 elements. Elements in one list are not in the others (except of the empty string). However, there are words that can be part of other words.
I am looking for an efficient way to find the three components. Right now I am doing the following:
for word in list2:
if word in long_word:
try:
[bef, aft] = s.split(word)
except ValueError: # too many values to unpack
continue
if bef in list1 and aft in list3:
print('Found: {}, {}, {}'.format(bef, word, aft))
break
else:
print('Not found')
I wonder if there is a better way. I thought about using the pipe in a regex. But it seems that the number of alternatives are too big as I get: OverflowError: regular expression code size limit exceeded.
Thanks, | 0 |
8,680,172 | 12/30/2011 13:54:56 | 631,965 | 02/24/2011 08:48:46 | 69 | 2 | JSP out.flush() issue | I had a weird problem today. I have a head.jsp ( ending with out.flush ) which is being included by other pages. most of the pages doesn't have problem with this out.flush(); but one of my page is failing with IllegalStateException on jboss 4.2.2 GA.
I checked the related java file ResponseFacade.java I think. And see that problem occurs because of if (isCommitted) check.
I just removed the include statement from my problemmatic page and it is working now.
But the question is; why the other pages does not have problem with this page while the only one page has ?
or if a jsp file is being included by other pages. do I need to out.flush() in this included pages ?
| jsp | jspinclude | null | null | null | null | open | JSP out.flush() issue
===
I had a weird problem today. I have a head.jsp ( ending with out.flush ) which is being included by other pages. most of the pages doesn't have problem with this out.flush(); but one of my page is failing with IllegalStateException on jboss 4.2.2 GA.
I checked the related java file ResponseFacade.java I think. And see that problem occurs because of if (isCommitted) check.
I just removed the include statement from my problemmatic page and it is working now.
But the question is; why the other pages does not have problem with this page while the only one page has ?
or if a jsp file is being included by other pages. do I need to out.flush() in this included pages ?
| 0 |
8,533,289 | 12/16/2011 11:06:30 | 966,357 | 09/27/2011 06:08:09 | 339 | 31 | asp.net and xml for each hit to website | I have a question to understand the concept of asp.net with each client browser.
I am trying to update the XML on server when a user hits a particular page on my website.
This page is dynamic, but to large so i want it to load using an XML file also i have several drop downs on the page when user changes the value in drop down, i need to refresh the data based upon the selection, additionally my drop down is a custom designed here i donot get and selectedIndex change event.
So i m using JQuery to get the changed value in my drop down and planning to read XML from jQuery and display the data.
But since the XML is updated on hit of the page on server, i want know, if multiple users hit the same page, will the data displayed as per each users selection or it will mix the data and show the last hits record.
| asp.net | multiple-users | null | null | null | null | open | asp.net and xml for each hit to website
===
I have a question to understand the concept of asp.net with each client browser.
I am trying to update the XML on server when a user hits a particular page on my website.
This page is dynamic, but to large so i want it to load using an XML file also i have several drop downs on the page when user changes the value in drop down, i need to refresh the data based upon the selection, additionally my drop down is a custom designed here i donot get and selectedIndex change event.
So i m using JQuery to get the changed value in my drop down and planning to read XML from jQuery and display the data.
But since the XML is updated on hit of the page on server, i want know, if multiple users hit the same page, will the data displayed as per each users selection or it will mix the data and show the last hits record.
| 0 |
11,175,573 | 06/24/2012 06:57:16 | 669,904 | 03/21/2011 18:00:36 | 69 | 0 | Internet checking ios application | I have created an iPhone application Where i want to check internet connectivity.At the didFinishLaunchingWithOptions method of the app delegate method i wrote
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
viewController1 = [[ViewController1 alloc] initWithNibName:@"ViewController1" title:firstTabTitleGlobal bundle:nil];
viewController2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" title:secondTabTitleGlobal bundle:nil];
newNavController = [[UINavigationController alloc] initWithRootViewController:viewController1];
userNavController = [[UINavigationController alloc] initWithRootViewController:viewController2];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:newNavController,userNavController,nil]
Reachability *r = [Reachability reachabilityWithHostName:globalHostName];
NetworkStatus internetStatus = [r currentReachabilityStatus];
if ((internetStatus != ReachableViaWiFi) && (internetStatus != ReachableViaWWAN))
{
[self showAlert:globalNetAlertTitle msg:globalNetAlertMsg];
[activityIndicator stopAnimating];
}
else
{
[activityIndicator stopAnimating];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
}
My Code is ok because when no internet connectivity then show alert.But problem is when no interner then default.png is shown. When i run apps again then the apps runs from the showing default.png. And nothing happen.
Thanks in advance. | iphone | ios | background-process | null | null | null | open | Internet checking ios application
===
I have created an iPhone application Where i want to check internet connectivity.At the didFinishLaunchingWithOptions method of the app delegate method i wrote
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
viewController1 = [[ViewController1 alloc] initWithNibName:@"ViewController1" title:firstTabTitleGlobal bundle:nil];
viewController2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" title:secondTabTitleGlobal bundle:nil];
newNavController = [[UINavigationController alloc] initWithRootViewController:viewController1];
userNavController = [[UINavigationController alloc] initWithRootViewController:viewController2];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:newNavController,userNavController,nil]
Reachability *r = [Reachability reachabilityWithHostName:globalHostName];
NetworkStatus internetStatus = [r currentReachabilityStatus];
if ((internetStatus != ReachableViaWiFi) && (internetStatus != ReachableViaWWAN))
{
[self showAlert:globalNetAlertTitle msg:globalNetAlertMsg];
[activityIndicator stopAnimating];
}
else
{
[activityIndicator stopAnimating];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
}
My Code is ok because when no internet connectivity then show alert.But problem is when no interner then default.png is shown. When i run apps again then the apps runs from the showing default.png. And nothing happen.
Thanks in advance. | 0 |
10,735,676 | 05/24/2012 10:28:44 | 1,414,756 | 05/24/2012 10:24:12 | 1 | 0 | can not use 'OnComplete' client event with telerik mvc grid | i use telerik mvc release 2011.2.712,Jquery 1.4.1
the problem is :
when i use clientEvent OnComplete or OnCommand i get error
**Unknown method 'OnComplete' of 'telerik.web.mvc.UI.fluent.GridClientEventsBuilder'**
please any body can help me | mvc | grid | telerik | null | null | 05/24/2012 20:41:18 | not a real question | can not use 'OnComplete' client event with telerik mvc grid
===
i use telerik mvc release 2011.2.712,Jquery 1.4.1
the problem is :
when i use clientEvent OnComplete or OnCommand i get error
**Unknown method 'OnComplete' of 'telerik.web.mvc.UI.fluent.GridClientEventsBuilder'**
please any body can help me | 1 |
5,965,936 | 05/11/2011 14:30:59 | 60,147 | 01/29/2009 11:00:52 | 1,183 | 39 | Reccomended Colour Scheme to use with VS2010 & Resharper? | What colour scheme would you recommend to use with Visual Studio (2008/2010), for web development, when you have Resharper installed?
Currently I use this one:
http://studiostyl.es/schemes/son-of-obsidian
It's really nice aside from the comments (blue on black) and the occassional hi-lighting issue. | .net | visual-studio | resharper | null | null | 05/11/2011 14:41:47 | off topic | Reccomended Colour Scheme to use with VS2010 & Resharper?
===
What colour scheme would you recommend to use with Visual Studio (2008/2010), for web development, when you have Resharper installed?
Currently I use this one:
http://studiostyl.es/schemes/son-of-obsidian
It's really nice aside from the comments (blue on black) and the occassional hi-lighting issue. | 2 |
8,049,987 | 11/08/2011 11:56:46 | 946,178 | 09/15/2011 06:56:02 | 11 | 0 | background task in Objective-c | I have come across a requirement in my iPad (objective-c) app. I want to executing some task in the background ? How can I do this ? | objective-c | null | null | null | null | 12/20/2011 02:57:25 | not a real question | background task in Objective-c
===
I have come across a requirement in my iPad (objective-c) app. I want to executing some task in the background ? How can I do this ? | 1 |
5,695,127 | 04/17/2011 17:30:37 | 712,342 | 04/17/2011 17:26:23 | 1 | 0 | Why does not execute this linked list code? | I don't know why this code doesn't work...
#
include <iostream>
using namespace std;
struct Triple {int row, col, value;};
class Matrix;
class MatrixNode
{
friend class Matrix;
friend istream& operator>>(istream&, Matrix&);
private:
MatrixNode *down, *right;
bool head;
union {
MatrixNode *next;
Triple triple;
};
MatrixNode(bool, Triple*);
};
MatrixNode::MatrixNode(bool b, Triple* t)
{
head = b;
if (b) {right = down = this;}
else triple = *t;
}
class Matrix {
friend istream& operator>>(istream&, Matrix&);
public:
~Matrix();
private:
MatrixNode *headnode;
};
istream& operator>>(istream& is, Matrix& matrix)
{
Triple s;
cout << "Enter the numbers of row, colume, value" << endl;
is >> s.row >> s.col >> s.value;
int p = max(s.row, s.col);
matrix.headnode = new MatrixNode(false, &s);
if (p == 0) { matrix.headnode->right = matrix.headnode; return is;}
MatrixNode **head = new MatrixNode*[p];
for (int i = 0; i < p; i++)
head[i] = new MatrixNode(true, 0);
int currentRow=0;
MatrixNode *last = head[0];
for (int i = 0; i < s.value; i++)
{
Triple t;
cout << "Enter the terms" << endl;
is >> t.row >> t.col >> t.value;
if (t.row > currentRow){
last -> right = head[currentRow];
currentRow = t.row;
last = head[currentRow];
}
last = last -> right = new MatrixNode(false, &t);
head[t.col]->next = head[t.col]->next->down = last;
}
last -> right = head[currentRow];
for (int i = 0; i < s.col; i++)
head[i] -> next -> down = head[i];
for(int i = 0; i < p - 1; i++)
head[i] -> next = head[i+1];
head[p-1] -> next = matrix.headnode;
matrix.headnode -> right = head[0];
delete [] head;
return is;
}
int main()
{
Matrix *a = new Matrix;
Matrix *b = new Matrix;
cin >> *a;
cin >> *b;
}
| linked-list | null | null | null | null | 04/18/2011 03:48:44 | not a real question | Why does not execute this linked list code?
===
I don't know why this code doesn't work...
#
include <iostream>
using namespace std;
struct Triple {int row, col, value;};
class Matrix;
class MatrixNode
{
friend class Matrix;
friend istream& operator>>(istream&, Matrix&);
private:
MatrixNode *down, *right;
bool head;
union {
MatrixNode *next;
Triple triple;
};
MatrixNode(bool, Triple*);
};
MatrixNode::MatrixNode(bool b, Triple* t)
{
head = b;
if (b) {right = down = this;}
else triple = *t;
}
class Matrix {
friend istream& operator>>(istream&, Matrix&);
public:
~Matrix();
private:
MatrixNode *headnode;
};
istream& operator>>(istream& is, Matrix& matrix)
{
Triple s;
cout << "Enter the numbers of row, colume, value" << endl;
is >> s.row >> s.col >> s.value;
int p = max(s.row, s.col);
matrix.headnode = new MatrixNode(false, &s);
if (p == 0) { matrix.headnode->right = matrix.headnode; return is;}
MatrixNode **head = new MatrixNode*[p];
for (int i = 0; i < p; i++)
head[i] = new MatrixNode(true, 0);
int currentRow=0;
MatrixNode *last = head[0];
for (int i = 0; i < s.value; i++)
{
Triple t;
cout << "Enter the terms" << endl;
is >> t.row >> t.col >> t.value;
if (t.row > currentRow){
last -> right = head[currentRow];
currentRow = t.row;
last = head[currentRow];
}
last = last -> right = new MatrixNode(false, &t);
head[t.col]->next = head[t.col]->next->down = last;
}
last -> right = head[currentRow];
for (int i = 0; i < s.col; i++)
head[i] -> next -> down = head[i];
for(int i = 0; i < p - 1; i++)
head[i] -> next = head[i+1];
head[p-1] -> next = matrix.headnode;
matrix.headnode -> right = head[0];
delete [] head;
return is;
}
int main()
{
Matrix *a = new Matrix;
Matrix *b = new Matrix;
cin >> *a;
cin >> *b;
}
| 1 |
11,714,025 | 07/30/2012 00:03:17 | 626,939 | 02/21/2011 16:27:56 | 326 | 1 | CSS3/Javascript Online Reference | I remember a website that could drilldown on the left side to give a reference to any css3 or javascript element that you are looking for. I can't remember the name of it, but could you give me some links that could be it. I can't remember the name of it, but need to find it. Gosh, wish I could remember it, but don't have the first clue of what the name of it was.
Thank you,
Rob | jquery | css3 | null | null | null | 07/30/2012 13:26:33 | not constructive | CSS3/Javascript Online Reference
===
I remember a website that could drilldown on the left side to give a reference to any css3 or javascript element that you are looking for. I can't remember the name of it, but could you give me some links that could be it. I can't remember the name of it, but need to find it. Gosh, wish I could remember it, but don't have the first clue of what the name of it was.
Thank you,
Rob | 4 |
9,150,924 | 02/05/2012 16:36:38 | 360,211 | 06/07/2010 08:50:27 | 641 | 32 | I have a file:// Uri but I want a content:// uri | I have found that on my device, the default media display tool is not showing me the same if Ihave a uri that is:
file://mnt/sdcard/DCIM/Image.jpg
When I go through picking the image with the built in intent I get this:
content://media/external/images/media/247
These both display the same file, but I don't have any sharing options when I use the first one.
My question is, how can I find the content Uri given the file Uri? | android | uri | null | null | null | null | open | I have a file:// Uri but I want a content:// uri
===
I have found that on my device, the default media display tool is not showing me the same if Ihave a uri that is:
file://mnt/sdcard/DCIM/Image.jpg
When I go through picking the image with the built in intent I get this:
content://media/external/images/media/247
These both display the same file, but I don't have any sharing options when I use the first one.
My question is, how can I find the content Uri given the file Uri? | 0 |
4,487,055 | 12/20/2010 05:10:25 | 548,218 | 12/20/2010 04:58:32 | 1 | 0 | Android - add menu item to Android's built-in appsBest Replied | i want to add a button or menu item in the Contacts menu . Is it possible.???
Im using Android 2.2 and Eclipse 3.6.1 | android | null | null | null | null | null | open | Android - add menu item to Android's built-in appsBest Replied
===
i want to add a button or menu item in the Contacts menu . Is it possible.???
Im using Android 2.2 and Eclipse 3.6.1 | 0 |
3,078,389 | 06/20/2010 06:10:44 | 371,399 | 06/20/2010 05:58:42 | 1 | 0 | JAVA-default no argument constructor? | Can any one explain me the basic need of default no argumnet constructor in many Java related APIs. Like as a general rule all java bean classes or entity classes (JPA etc) or JAX-WS implementation classes require a explicit no argumnet constrcutor.
If by default Java provides a no argument constructor then why most of these standards require a explicit constructor?
Thanks in advance.
Rakesh | java | null | null | null | null | null | open | JAVA-default no argument constructor?
===
Can any one explain me the basic need of default no argumnet constructor in many Java related APIs. Like as a general rule all java bean classes or entity classes (JPA etc) or JAX-WS implementation classes require a explicit no argumnet constrcutor.
If by default Java provides a no argument constructor then why most of these standards require a explicit constructor?
Thanks in advance.
Rakesh | 0 |
4,457,721 | 12/16/2010 05:31:24 | 444,569 | 09/10/2010 17:02:55 | 27 | 4 | dialog- button text | enter code here
$("#modal").dialog({
resizable: false,
modal: true,
buttons: {
Cancel: function () {
alert("Cancel");
},
Add user: function () {
alert("Add user");
}
}
});
Here is my code for a modal pop up. i have 2 button Cancel and Add user
.but "Add user" gives error for me. if it is Add_user it is ok
what work around can i have, to have Add user as a text on my button
?
| jq | null | null | null | null | null | open | dialog- button text
===
enter code here
$("#modal").dialog({
resizable: false,
modal: true,
buttons: {
Cancel: function () {
alert("Cancel");
},
Add user: function () {
alert("Add user");
}
}
});
Here is my code for a modal pop up. i have 2 button Cancel and Add user
.but "Add user" gives error for me. if it is Add_user it is ok
what work around can i have, to have Add user as a text on my button
?
| 0 |
3,391,766 | 08/02/2010 21:07:47 | 241,978 | 01/01/2010 16:27:47 | 71 | 9 | NSButton in NSToolbarItem (setView) when clicked in "Text only" forces mode to "Icon and Label" | I am trying to recreate the nice textured buttons like Finder, Safari and Transmission have in their toolbar. First I started by just dragging in a "Texture button" in the IB and such. All works well except for when a user sets the toolbar to "Text only" mode. When he then clicks the button the toolbar will enable "Icon and Label" on it's own. I have remove alles code and delegates from the toolbar to make sure it is not a code issue.
Then, just to make sure, I created a new project (no code at all) and I can reproduce the issue with a clean NSWindow with a NSToolbar with one NSToolbarItem with a NSButton in it.
Adding the NSButtons via code like:
- (NSArray*)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar {
return [NSArray arrayWithObject:@"myToolbarMenu"];
}
- (NSArray*)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar {
return [self toolbarAllowedItemIdentifiers:toolbar];
}
- (NSToolbarItem*)toolbar:(NSToolbar*)toolbar
itemForItemIdentifier:(NSString*)str
willBeInsertedIntoToolbar:(BOOL)flag
{
if ([str isEqualToString:@"myToolbarItem"] == YES) {
NSToolbarItem* item = [[NSToolbarItem alloc] initWithItemIdentifier:str];
[item setView:[[NSButton alloc] init]];
[item setMinSize:NSMakeSize(50,50)];
[item setMaxSize:NSMakeSize(50,50)];
[item setLabel:@"Text"];
return [item autorelease];
}
return nil;
}
But this also has the same effect: when I press a NSToolbarItem with a NSButton in it in "Text only mode" the toolbar itself forces it's mode to "Icon and Text".
Do you have any idea how I can make it work correctly or perhaps have an alternative to creating the nice looking toolbaritems like Safari etc have? | cocoa | interface-builder | nstoolbar | nstoolbaritem | null | null | open | NSButton in NSToolbarItem (setView) when clicked in "Text only" forces mode to "Icon and Label"
===
I am trying to recreate the nice textured buttons like Finder, Safari and Transmission have in their toolbar. First I started by just dragging in a "Texture button" in the IB and such. All works well except for when a user sets the toolbar to "Text only" mode. When he then clicks the button the toolbar will enable "Icon and Label" on it's own. I have remove alles code and delegates from the toolbar to make sure it is not a code issue.
Then, just to make sure, I created a new project (no code at all) and I can reproduce the issue with a clean NSWindow with a NSToolbar with one NSToolbarItem with a NSButton in it.
Adding the NSButtons via code like:
- (NSArray*)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar {
return [NSArray arrayWithObject:@"myToolbarMenu"];
}
- (NSArray*)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar {
return [self toolbarAllowedItemIdentifiers:toolbar];
}
- (NSToolbarItem*)toolbar:(NSToolbar*)toolbar
itemForItemIdentifier:(NSString*)str
willBeInsertedIntoToolbar:(BOOL)flag
{
if ([str isEqualToString:@"myToolbarItem"] == YES) {
NSToolbarItem* item = [[NSToolbarItem alloc] initWithItemIdentifier:str];
[item setView:[[NSButton alloc] init]];
[item setMinSize:NSMakeSize(50,50)];
[item setMaxSize:NSMakeSize(50,50)];
[item setLabel:@"Text"];
return [item autorelease];
}
return nil;
}
But this also has the same effect: when I press a NSToolbarItem with a NSButton in it in "Text only mode" the toolbar itself forces it's mode to "Icon and Text".
Do you have any idea how I can make it work correctly or perhaps have an alternative to creating the nice looking toolbaritems like Safari etc have? | 0 |
1,864,734 | 12/08/2009 05:07:07 | 174,261 | 09/16/2009 10:28:26 | 46 | 3 | How to know which Linux Distribution I'm using? | How to know which Linux Distribution I'm using?
uname -a gives
Linux xxxxxx.net 2.6.9-42.0.3.EL.wh1smp #1 SMP Fri Aug 14 15:48:17 MDT 2009 i686 i686 i386 GNU/Linux
How can I know this is Ubuntu/Debian/Fedora or Redhat?
| linux | distribution | version | null | null | 12/08/2009 06:13:34 | off topic | How to know which Linux Distribution I'm using?
===
How to know which Linux Distribution I'm using?
uname -a gives
Linux xxxxxx.net 2.6.9-42.0.3.EL.wh1smp #1 SMP Fri Aug 14 15:48:17 MDT 2009 i686 i686 i386 GNU/Linux
How can I know this is Ubuntu/Debian/Fedora or Redhat?
| 2 |
7,256,946 | 08/31/2011 12:32:20 | 803,418 | 06/17/2011 14:38:53 | 119 | 4 | Distributed Domain Driven Design Resources | I am quite confident with developing DDD applications, but one area which is continuing to cause me problems is when two applications integrate with each other. I am struggling to find any useful books or resources on the subject. Books such as Patterns of EAI go into depth about messaging patterns and message construction, but don't really explain how to architect systems that make use of these patterns.
I've searched high and low and I'm quite sure there are no sample applications that demostrate how to integrate two systems. I understand the concept of asynchronous messaging, but again can't find good examples of how to apply it.
Resources on SOA seem to keep repeating the same concepts without demonstarting how to implement them, and more often than not seem more concerned with selling me products.
Here are the sort of questions I am struggling to answer:
1. Should each application have it's own copy of the data? For example, should every application within an organisation have it's own list of clients, which it updates upon the receipt of a message?
2. At what point in the DDD stack are messages passed? Are they the result of domain events?
3. Can I combine asynchrounous messaging and WCF or do I have to chose? Do I use WCF for request/response and messaging for publish/subscribe?
4. How does one DDD application consume the services of another? Should one DDD application query another system for its data via its application services, or should it already have its own local copy of the data, as mentioned in point 1?
5. Apparently I can't have a transaction across two systems. How do I avoid this?
If I sound confused it's because I am. I'm not looking for answers to the above questions, just pointing in the direction of resources that will answer this and simmilar questions. | domain-driven-design | soa | distributed | messaging | dddd | 08/31/2011 14:58:08 | not constructive | Distributed Domain Driven Design Resources
===
I am quite confident with developing DDD applications, but one area which is continuing to cause me problems is when two applications integrate with each other. I am struggling to find any useful books or resources on the subject. Books such as Patterns of EAI go into depth about messaging patterns and message construction, but don't really explain how to architect systems that make use of these patterns.
I've searched high and low and I'm quite sure there are no sample applications that demostrate how to integrate two systems. I understand the concept of asynchronous messaging, but again can't find good examples of how to apply it.
Resources on SOA seem to keep repeating the same concepts without demonstarting how to implement them, and more often than not seem more concerned with selling me products.
Here are the sort of questions I am struggling to answer:
1. Should each application have it's own copy of the data? For example, should every application within an organisation have it's own list of clients, which it updates upon the receipt of a message?
2. At what point in the DDD stack are messages passed? Are they the result of domain events?
3. Can I combine asynchrounous messaging and WCF or do I have to chose? Do I use WCF for request/response and messaging for publish/subscribe?
4. How does one DDD application consume the services of another? Should one DDD application query another system for its data via its application services, or should it already have its own local copy of the data, as mentioned in point 1?
5. Apparently I can't have a transaction across two systems. How do I avoid this?
If I sound confused it's because I am. I'm not looking for answers to the above questions, just pointing in the direction of resources that will answer this and simmilar questions. | 4 |
4,631,622 | 01/08/2011 00:43:57 | 361,883 | 06/08/2010 23:03:09 | 44 | 0 | Outputting a list of MySQL table values in PHP/HTML | I have a MySQL list with a few categories and a lot of rows of data. I want to simply output that in PHP/HTML. How would I do that? | php | mysql | html | null | null | null | open | Outputting a list of MySQL table values in PHP/HTML
===
I have a MySQL list with a few categories and a lot of rows of data. I want to simply output that in PHP/HTML. How would I do that? | 0 |
5,986,837 | 05/13/2011 03:02:45 | 628,596 | 02/22/2011 15:48:14 | 35 | 0 | Escape all HTML except <br> | I am trying to display comments on a page and am having some trouble.
There are essentially two different types of comments I am trying to handle:
(1) The XSS type.. e.g. <pre><script type="text/javascript">alert('hi')</script></pre>. This is handled fairly easily by escaping it before it gets into the database and then running stripslashes and htmlentities on it.
(2) The comment with <br> breaks in it. When the data is stored into the database, I am running nl2br on it so the data looks like "hi<br>hello<br><br>etc". However, when I display this comment, the <br>s do not turn into page breaks like I want them to.
Any idea what to do? I should note that turning off htmlentities fixes the second type, but the first type then is executed as pure html and displays an alert dialog.
Thanks,
Phil | php | html | xss | html-entities | null | null | open | Escape all HTML except <br>
===
I am trying to display comments on a page and am having some trouble.
There are essentially two different types of comments I am trying to handle:
(1) The XSS type.. e.g. <pre><script type="text/javascript">alert('hi')</script></pre>. This is handled fairly easily by escaping it before it gets into the database and then running stripslashes and htmlentities on it.
(2) The comment with <br> breaks in it. When the data is stored into the database, I am running nl2br on it so the data looks like "hi<br>hello<br><br>etc". However, when I display this comment, the <br>s do not turn into page breaks like I want them to.
Any idea what to do? I should note that turning off htmlentities fixes the second type, but the first type then is executed as pure html and displays an alert dialog.
Thanks,
Phil | 0 |
2,081,986 | 01/17/2010 17:55:52 | 252,711 | 01/17/2010 17:53:26 | 1 | 0 | Android XML Styling | I'm using themes to style widgets in Android.
With the code:
<item name="android:width">200px</item>
... i can set the width of the widget to 200px.
But how can I specify "wrap_content" and "fill_parent"?
Strings are not allowed there! | android | xml | styling | null | null | null | open | Android XML Styling
===
I'm using themes to style widgets in Android.
With the code:
<item name="android:width">200px</item>
... i can set the width of the widget to 200px.
But how can I specify "wrap_content" and "fill_parent"?
Strings are not allowed there! | 0 |
353,795 | 12/09/2008 18:48:18 | 27,478 | 10/13/2008 15:28:24 | 26 | 1 | Inherited a PHP nightmare, where to start? | I've inherited a PHP project that's turning out to be a nightmare. Here are the salient points:
1. All the original developers have left
2. The code has no version control
3. All development and testing was done on the live server by renaming and editing the PHP files. There are multiple copies of each file index.php, index2.php, index3.php etc. and it's unclear which files are really being used
4. There are multiple includes in each file to files that include other files that include other files, etc.
5. There have been a multiple developers on the project that each had there own way of doing things. For example, there is a hodgepodge of JavaScript frameworks, some database queries use SQL, others an XML interface and others call procedural functions in the database.
Because of all of these problems, development is frustratingly slow. Besides venting my frustrations to Stack Overflow, any recommendations on how to get started on this mess? I'm fairly new to PHP development myself, but it seems like setting up some kind of development environment so that changes can be tested without breaking the live server is the first step. Any tips on how to get started here? What is a typical way to do testing? Setting up a local version of the site on my desktop seems like a lot of work (server is Linux, but desktops here are Windows). Can I create a subdirectory on the live server for testing, or..? What about the database?
Secondly, is there some kind of profiling I can enable to track which files on the server are actually being used? I'd like to delete the renamed copies of things that aren't actually being included. Even better, is there a way to tell which parts of a file aren't being executed? There are lots of copied functions and garbage in that I suspect aren't being used either. Similarly, for the includes, any tips on straightening out the mess?
Well, I'll stop venting here and throw myself at the mercy of everyone here. :) | php | development | nightmare | null | null | 11/02/2011 18:39:30 | not constructive | Inherited a PHP nightmare, where to start?
===
I've inherited a PHP project that's turning out to be a nightmare. Here are the salient points:
1. All the original developers have left
2. The code has no version control
3. All development and testing was done on the live server by renaming and editing the PHP files. There are multiple copies of each file index.php, index2.php, index3.php etc. and it's unclear which files are really being used
4. There are multiple includes in each file to files that include other files that include other files, etc.
5. There have been a multiple developers on the project that each had there own way of doing things. For example, there is a hodgepodge of JavaScript frameworks, some database queries use SQL, others an XML interface and others call procedural functions in the database.
Because of all of these problems, development is frustratingly slow. Besides venting my frustrations to Stack Overflow, any recommendations on how to get started on this mess? I'm fairly new to PHP development myself, but it seems like setting up some kind of development environment so that changes can be tested without breaking the live server is the first step. Any tips on how to get started here? What is a typical way to do testing? Setting up a local version of the site on my desktop seems like a lot of work (server is Linux, but desktops here are Windows). Can I create a subdirectory on the live server for testing, or..? What about the database?
Secondly, is there some kind of profiling I can enable to track which files on the server are actually being used? I'd like to delete the renamed copies of things that aren't actually being included. Even better, is there a way to tell which parts of a file aren't being executed? There are lots of copied functions and garbage in that I suspect aren't being used either. Similarly, for the includes, any tips on straightening out the mess?
Well, I'll stop venting here and throw myself at the mercy of everyone here. :) | 4 |
5,534,050 | 04/04/2011 02:34:18 | 564,979 | 01/06/2011 05:11:14 | 195 | 4 | load() a html with dojo content | i have a simple dojo chart that work's well in a separate file.
now the problem,
if i import the file with `$('#result').load('dojo.html');` nothing happens, the page not loads the graph. If i do a require in a php file, it works...the chart is loaded.
so, the question is: how is the reason that cause the problem when i make a import with the method load();
It is supposed to work? (draw the chart)
thanks | javascript | jquery | frameworks | dojo | null | null | open | load() a html with dojo content
===
i have a simple dojo chart that work's well in a separate file.
now the problem,
if i import the file with `$('#result').load('dojo.html');` nothing happens, the page not loads the graph. If i do a require in a php file, it works...the chart is loaded.
so, the question is: how is the reason that cause the problem when i make a import with the method load();
It is supposed to work? (draw the chart)
thanks | 0 |
5,191,455 | 03/04/2011 08:42:13 | 496,949 | 11/04/2010 08:45:00 | 2,722 | 1 | what the package you recommend to parse XML and JSON | Any package you recommend to process XML and JSON data? | java | null | null | null | null | 03/04/2011 13:31:26 | not a real question | what the package you recommend to parse XML and JSON
===
Any package you recommend to process XML and JSON data? | 1 |
7,060,015 | 08/14/2011 22:03:10 | 353,802 | 05/29/2010 23:48:04 | 9,570 | 648 | JQuery challenge - draw tally marks on click event | **The Challenge:**
Assign a click event to something which will draw a tally mark inside a container. The tally mark should respect other tally marks already drawn so the positioning of the tally marks makes sense. After every click, tally marks should represent total number of clicks thus far.
These are tally marks:
1 2 3 4 5
▼ ▼ ▼ ▼ ▼
![Tally marks example][1]
The following example has a tally mark count of 83:
![enter image description here][2]
**Challenge Rules:**
- Must use JQuery & HTML 5.
- Tally marks must be added to a container, not the body.
- The container where you draw the tallies must grow to accommodate new tallies.
- Sprite or CSS3 for the actual tick mark is up to you. Feel free to use the first image as your sprite :)
- Increment ONLY - no need to remove tallies. Once they are scratched into a prison cell wall, they are there for life!
- Must post a link to a working demo on http://jsfiddle.net/
- Have fun!
[1]: http://i.stack.imgur.com/96hvp.png
[2]: http://i.stack.imgur.com/NNrQx.jpg | jquery | css3 | null | null | null | 11/22/2011 07:38:08 | not constructive | JQuery challenge - draw tally marks on click event
===
**The Challenge:**
Assign a click event to something which will draw a tally mark inside a container. The tally mark should respect other tally marks already drawn so the positioning of the tally marks makes sense. After every click, tally marks should represent total number of clicks thus far.
These are tally marks:
1 2 3 4 5
▼ ▼ ▼ ▼ ▼
![Tally marks example][1]
The following example has a tally mark count of 83:
![enter image description here][2]
**Challenge Rules:**
- Must use JQuery & HTML 5.
- Tally marks must be added to a container, not the body.
- The container where you draw the tallies must grow to accommodate new tallies.
- Sprite or CSS3 for the actual tick mark is up to you. Feel free to use the first image as your sprite :)
- Increment ONLY - no need to remove tallies. Once they are scratched into a prison cell wall, they are there for life!
- Must post a link to a working demo on http://jsfiddle.net/
- Have fun!
[1]: http://i.stack.imgur.com/96hvp.png
[2]: http://i.stack.imgur.com/NNrQx.jpg | 4 |
9,280,570 | 02/14/2012 16:33:43 | 456,532 | 09/23/2010 18:41:39 | 771 | 101 | Trouble using DataGridViewComboboxColumn for input | I have a datagridview which I'm using for data entry. I've done this before with all text columns, and it worked great. But now I want one of the columns to be a databound combobox so the user can select options. When I do this, the resulting gridview's datasource ends up with empty rows (but the right quantity). What am I missing?
Here is code:
DataGridViewComboBoxColumn cboCategory = new DataGridViewComboBoxColumn();
{
cboCategory.HeaderText = "Category";
cboCategory.DataSource = downtimeCategories;
cboCategory.DisplayMember = "Name";
cboCategory.ValueMember = "CategoryID";
cboCategory.DataPropertyName = "CategoryID";
gridDowntime.Columns.Add(cboCategory);
}
Then code to grab gridview's datasource:
DataTable dt = (gridDowntime.DataSource as DataTable);
Everytime I get a table with the correct number of rows, but all the rows are empty. How can I find the error and correct? | c# | winforms | datagridview | null | null | null | open | Trouble using DataGridViewComboboxColumn for input
===
I have a datagridview which I'm using for data entry. I've done this before with all text columns, and it worked great. But now I want one of the columns to be a databound combobox so the user can select options. When I do this, the resulting gridview's datasource ends up with empty rows (but the right quantity). What am I missing?
Here is code:
DataGridViewComboBoxColumn cboCategory = new DataGridViewComboBoxColumn();
{
cboCategory.HeaderText = "Category";
cboCategory.DataSource = downtimeCategories;
cboCategory.DisplayMember = "Name";
cboCategory.ValueMember = "CategoryID";
cboCategory.DataPropertyName = "CategoryID";
gridDowntime.Columns.Add(cboCategory);
}
Then code to grab gridview's datasource:
DataTable dt = (gridDowntime.DataSource as DataTable);
Everytime I get a table with the correct number of rows, but all the rows are empty. How can I find the error and correct? | 0 |
6,792,940 | 07/22/2011 16:18:14 | 730,047 | 04/28/2011 20:20:41 | 72 | 3 | What is the best way to get "Login with Facebook" and "Login with Twitter" buttons for my app? | I have downloaded several images from the web but they are all too small and therefore the resolution gets bad on scale up. What is the proper way of getting these specific buttons to my application? (Just the interface-I have already implemented the back end ) | android | facebook | button | twitter | null | 07/23/2011 20:06:19 | off topic | What is the best way to get "Login with Facebook" and "Login with Twitter" buttons for my app?
===
I have downloaded several images from the web but they are all too small and therefore the resolution gets bad on scale up. What is the proper way of getting these specific buttons to my application? (Just the interface-I have already implemented the back end ) | 2 |
9,864,167 | 03/25/2012 21:17:42 | 1,262,830 | 03/11/2012 20:48:28 | 11 | 0 | Merging/Combining a list of Integers with Char [Haskell] | I'd like a hint on how to apply this function:
`dti xs = (map intToDigit (take 6 (map digitToInt xs))++['/']++map intToDigit(drop 6 (map digitToInt xs)))`
on a list of Integers, e.g.; [1234567822,3245336792,...], so I'd get an output like ["123456/7822","324533/6792",...].
The point is to add a "/" after the 6th digit in each number of a list of integers, e.g.; [1234567822,3245336792,...]. Maybe there's a better way to do it than mine. | list | haskell | integer | char | null | null | open | Merging/Combining a list of Integers with Char [Haskell]
===
I'd like a hint on how to apply this function:
`dti xs = (map intToDigit (take 6 (map digitToInt xs))++['/']++map intToDigit(drop 6 (map digitToInt xs)))`
on a list of Integers, e.g.; [1234567822,3245336792,...], so I'd get an output like ["123456/7822","324533/6792",...].
The point is to add a "/" after the 6th digit in each number of a list of integers, e.g.; [1234567822,3245336792,...]. Maybe there's a better way to do it than mine. | 0 |
2,597,230 | 04/08/2010 02:36:51 | 19,072 | 09/19/2008 16:54:21 | 817 | 76 | Loop through all subclasses in an Android view? | I’m working on a game for Android. To help implement it, my idea is to create a subclass of a view. I would then insert several instances of this class as children of the main view. Each instance would handle detecting when it was pressed (via OnTouchListener).
The problem I’m having now is how do I loop through all these sub-views so I can read their statuses and process them? (I.e. when they all reach a certain state something should happen).
Or is there a better way to have several objects on the screen that respond to touch and whose status I can check?
| android | view | null | null | null | null | open | Loop through all subclasses in an Android view?
===
I’m working on a game for Android. To help implement it, my idea is to create a subclass of a view. I would then insert several instances of this class as children of the main view. Each instance would handle detecting when it was pressed (via OnTouchListener).
The problem I’m having now is how do I loop through all these sub-views so I can read their statuses and process them? (I.e. when they all reach a certain state something should happen).
Or is there a better way to have several objects on the screen that respond to touch and whose status I can check?
| 0 |
10,652,113 | 05/18/2012 11:49:45 | 1,177,921 | 01/30/2012 11:19:02 | 31 | 0 | How to iterate list object | Hi i am new to sench touch2. i am consuming webservice. it is returning list. how to iterate this one. please any one can help me..
here is my output:
request: Array[2]
0: Object
<CompanyId>k__BackingField: 0
<CreatedBy>k__BackingField: null
<LongDescription>k__BackingField: null
<MainImageUrl>k__BackingField: "images/image1.jpg"
<ModifiedBy>k__BackingField: null
1: Object
<CompanyId>k__BackingField: 1
<CreatedBy>k__BackingField: null
<LongDescription>k__BackingField: null
<MainImageUrl>k__BackingField: "images/image2.jpg"
<ModifiedBy>k__BackingField: null | javascript | sencha-touch-2 | null | null | null | 05/21/2012 23:30:03 | not a real question | How to iterate list object
===
Hi i am new to sench touch2. i am consuming webservice. it is returning list. how to iterate this one. please any one can help me..
here is my output:
request: Array[2]
0: Object
<CompanyId>k__BackingField: 0
<CreatedBy>k__BackingField: null
<LongDescription>k__BackingField: null
<MainImageUrl>k__BackingField: "images/image1.jpg"
<ModifiedBy>k__BackingField: null
1: Object
<CompanyId>k__BackingField: 1
<CreatedBy>k__BackingField: null
<LongDescription>k__BackingField: null
<MainImageUrl>k__BackingField: "images/image2.jpg"
<ModifiedBy>k__BackingField: null | 1 |
7,183,994 | 08/25/2011 00:57:34 | 613,231 | 02/11/2011 14:53:35 | 19 | 0 | Can 2 different lines on a webpage become to different text fields in Xcode | This may be difficult to understand but, is their a way to take text off a webpage and separate it into labels by the line it is on, on the webpage? | php | iphone | xcode | sdk | ios4.3 | 08/27/2011 16:47:11 | not a real question | Can 2 different lines on a webpage become to different text fields in Xcode
===
This may be difficult to understand but, is their a way to take text off a webpage and separate it into labels by the line it is on, on the webpage? | 1 |
7,344,820 | 09/08/2011 07:51:55 | 934,312 | 09/08/2011 07:51:55 | 1 | 0 | how to capture the mouse idle state in Master Page Iframe in javascript | I am using a Master page and many other pages from different folders are displayed in the IFrame within the master page.
If the user is not doing anything for some time [5 minutes or so] in any of the other pages, I want to give an alert message either to continue or to log out.
How to do this? | c# | asp.net | null | null | null | null | open | how to capture the mouse idle state in Master Page Iframe in javascript
===
I am using a Master page and many other pages from different folders are displayed in the IFrame within the master page.
If the user is not doing anything for some time [5 minutes or so] in any of the other pages, I want to give an alert message either to continue or to log out.
How to do this? | 0 |
7,037,715 | 08/12/2011 08:50:49 | 375,796 | 06/25/2010 00:09:59 | 26 | 1 | surfaceview orientation without main.xml or androidmanifest.xml | I would like to change the orientation of my SurfaceView from landscape to portrait. I'm doing this without the use of main.xml (rendering it using only java code) and I would like to know how. Most of the questions here deal with camera orientation, but I would like to know if it's possible to play video in portrait instead of landscape through the SurfaceView. Do I use onMeasure() or onLayout()? Any other functions work? Thanks
BTW I have implemented changes in main.xml and androidmanifest.xml, but they have not worked. I also used setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); but does not work as well. | java | android | surfaceview | null | null | null | open | surfaceview orientation without main.xml or androidmanifest.xml
===
I would like to change the orientation of my SurfaceView from landscape to portrait. I'm doing this without the use of main.xml (rendering it using only java code) and I would like to know how. Most of the questions here deal with camera orientation, but I would like to know if it's possible to play video in portrait instead of landscape through the SurfaceView. Do I use onMeasure() or onLayout()? Any other functions work? Thanks
BTW I have implemented changes in main.xml and androidmanifest.xml, but they have not worked. I also used setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); but does not work as well. | 0 |
5,373,347 | 03/21/2011 02:49:53 | 668,784 | 03/21/2011 02:45:36 | 1 | 0 | Microsoft WebMatrix Intellisense Support? | Anyone know when intellisense support is coming to WebMatrix?
Thanks | intellisense | webmatrix | null | null | null | 03/21/2011 03:38:27 | too localized | Microsoft WebMatrix Intellisense Support?
===
Anyone know when intellisense support is coming to WebMatrix?
Thanks | 3 |
10,418,296 | 05/02/2012 16:54:49 | 1,168,680 | 01/25/2012 07:31:25 | 8 | 0 | Linux to Linux GUI Remote | I wants to access **GUI** of Linux machine from another Linux machine.
I can access its terminal using "**ssh username@IP_Address**" command but i wants the access of its GUI. | linux | remote-access | null | null | null | 05/03/2012 18:49:01 | off topic | Linux to Linux GUI Remote
===
I wants to access **GUI** of Linux machine from another Linux machine.
I can access its terminal using "**ssh username@IP_Address**" command but i wants the access of its GUI. | 2 |
6,788,203 | 07/22/2011 09:40:38 | 806,550 | 06/20/2011 11:40:04 | 170 | 8 | Pass parameters in scope | Can someone provide an example on how to use
scope
and parameters?
For example:
class Permission < ActiveRecord::Base
scope :default_permissions, :conditions => { :is_default => true }
end
I have this code that returns the default_permissions and I want to convert it to return the default permissions for a given user (user_id)
Thanks | ruby-on-rails | ruby-on-rails-3 | null | null | null | null | open | Pass parameters in scope
===
Can someone provide an example on how to use
scope
and parameters?
For example:
class Permission < ActiveRecord::Base
scope :default_permissions, :conditions => { :is_default => true }
end
I have this code that returns the default_permissions and I want to convert it to return the default permissions for a given user (user_id)
Thanks | 0 |
5,539,761 | 04/04/2011 14:14:34 | 497,470 | 11/04/2010 17:11:04 | 624 | 25 | Date predicament in vb/asp.net | Alright so i am building a daily sales goal that is based on last years sales on the exact same day of this year last year.
so for example today is monday, 05 2011 and to get the sales goal i would need to do monday, 04 2011 not monday 05 2011,
| asp.net | vb.net | null | null | null | 04/04/2011 19:41:37 | not a real question | Date predicament in vb/asp.net
===
Alright so i am building a daily sales goal that is based on last years sales on the exact same day of this year last year.
so for example today is monday, 05 2011 and to get the sales goal i would need to do monday, 04 2011 not monday 05 2011,
| 1 |
2,339,101 | 02/26/2010 02:20:30 | 205,910 | 11/08/2009 04:49:21 | 1 | 0 | Knight's Shortest Path Chess Question | I've been practicing for an upcoming programming competition and I have stumbled across a question that I am just completely bewildered at. However, I feel as though it's a concept I should learn now rather than cross my fingers that it never comes up.
Basically, it deals with a knight piece on a chess board. You are given two inputs: starting location and ending location. The goal is to then calculate and print the shortest path that the knight can take to get to the target location.
I've never dealt with shortest-path-esque things, and I don't even know where to start. What logic do I employ to go about tackling this?
P.S. If it's of any relevance, they want you to supplement the Knight's normal move ability by also allowing it to move to the four corners of the square a Knight's move paths create if in the center of the board.
| chess | logic | shortest | path | null | null | open | Knight's Shortest Path Chess Question
===
I've been practicing for an upcoming programming competition and I have stumbled across a question that I am just completely bewildered at. However, I feel as though it's a concept I should learn now rather than cross my fingers that it never comes up.
Basically, it deals with a knight piece on a chess board. You are given two inputs: starting location and ending location. The goal is to then calculate and print the shortest path that the knight can take to get to the target location.
I've never dealt with shortest-path-esque things, and I don't even know where to start. What logic do I employ to go about tackling this?
P.S. If it's of any relevance, they want you to supplement the Knight's normal move ability by also allowing it to move to the four corners of the square a Knight's move paths create if in the center of the board.
| 0 |
7,818,030 | 10/19/2011 07:41:21 | 860,103 | 07/24/2011 09:28:21 | 603 | 39 | Python - Which is faster to parse Json or XML? | From my observations overall `JSON` is faster to `Parse` than `XML`. I have found two good question regarding this. One is asked for [PHP][1] and other is asked for [JavaScript][2]. I want to know about python, how python is efficient with them? and which is more efficient to parse.
Also please help in choosing the best Python parser for XML (e.g. xmlparser library , lxml or ?) and JSON (simplejson, jsonlib or ?).
[1]: http://stackoverflow.com/questions/993282/php-is-json-or-xml-parser-faster
[2]: http://stackoverflow.com/questions/4596465/is-parsing-json-faster-than-parsing-xml | python | xml | json | xml-parsing | null | 10/20/2011 21:48:20 | not constructive | Python - Which is faster to parse Json or XML?
===
From my observations overall `JSON` is faster to `Parse` than `XML`. I have found two good question regarding this. One is asked for [PHP][1] and other is asked for [JavaScript][2]. I want to know about python, how python is efficient with them? and which is more efficient to parse.
Also please help in choosing the best Python parser for XML (e.g. xmlparser library , lxml or ?) and JSON (simplejson, jsonlib or ?).
[1]: http://stackoverflow.com/questions/993282/php-is-json-or-xml-parser-faster
[2]: http://stackoverflow.com/questions/4596465/is-parsing-json-faster-than-parsing-xml | 4 |
8,366,997 | 12/03/2011 10:18:52 | 1,009,702 | 10/23/2011 16:28:40 | 1 | 0 | The HTML is displayed with unrecognizable code when it's dispatchered by a servlet | I write a login page, when you fail,the page will be dispatchered back with a tip by a servlet. When the HTML Code is "UTF-8", It's displayed with **unrecognizable code**. After I changed the code by "GB2312", It's normal. Why? | html | servlets | null | null | null | 12/04/2011 08:21:01 | not a real question | The HTML is displayed with unrecognizable code when it's dispatchered by a servlet
===
I write a login page, when you fail,the page will be dispatchered back with a tip by a servlet. When the HTML Code is "UTF-8", It's displayed with **unrecognizable code**. After I changed the code by "GB2312", It's normal. Why? | 1 |
3,402,877 | 08/04/2010 05:35:54 | 148,271 | 07/31/2009 04:57:04 | 855 | 98 | Calling a function defined inside jQuery ready from outside of it. | My aspx page:-
<script src="js/jquery-1.4.2.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.2.custom.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
//lots of other code here....
function showMessage(){
$("#msgDiv").dialog({
modal: true,
buttons: {
Ok: function() {
$(this).dialog('close');
}
},
resizable: true,
show: "explode",
position: "center",
closeOnEscape: true,
draggable: false
});
}
});
</script>
Another aspx pop up page which is triggered from the above page
<script type="text/javascript">
window.opener.document.getElementById("msgDiv").innerHTML = <%=MessageToShow%>; //works very well for me.
window.opener.document.showMessage(); // I am unable to access it like this?
window.close();
</script>
Basically I want to call `showMessage()` from the pop up window. I also have other logics to perform in both pages. | javascript | jquery | null | null | null | null | open | Calling a function defined inside jQuery ready from outside of it.
===
My aspx page:-
<script src="js/jquery-1.4.2.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.2.custom.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
//lots of other code here....
function showMessage(){
$("#msgDiv").dialog({
modal: true,
buttons: {
Ok: function() {
$(this).dialog('close');
}
},
resizable: true,
show: "explode",
position: "center",
closeOnEscape: true,
draggable: false
});
}
});
</script>
Another aspx pop up page which is triggered from the above page
<script type="text/javascript">
window.opener.document.getElementById("msgDiv").innerHTML = <%=MessageToShow%>; //works very well for me.
window.opener.document.showMessage(); // I am unable to access it like this?
window.close();
</script>
Basically I want to call `showMessage()` from the pop up window. I also have other logics to perform in both pages. | 0 |
7,384,915 | 09/12/2011 08:05:43 | 660,146 | 03/15/2011 07:41:46 | 1 | 0 | "EXEC(columnname)" for each row in a SELECT, and get return value | What would be the best solution, if i have a table like this:
Value Formular
12 'SELECT Value+5 AS result'
15 'SELECT 4/Value+3 AS result'
16 'SELECT 5 AS result'
So, there are SQL-Statemants (as nvarchar(max)) in the Formular-Column. Now i need to calc for each row the result.
Current approach is a WHILE with cursor and handle each row for itself.
We need to use a temp-table for each row, because we were unable to find a better solution, how to get the result from the exec. Like:
declare @Value decimal(18,4);
create table #t(val decimal(18,4))
insert into #t exec(@formular)
select val from #t
We have >100'000 such rows, and this takes about ~2h do compute. (The formulas and values of course complexer, than in the example given)
Is there any possibility to get something like
SELECT Value, exec(Formular) as result FROM calctable
Thanks
| tsql | sql-server-2008 | null | null | null | null | open | "EXEC(columnname)" for each row in a SELECT, and get return value
===
What would be the best solution, if i have a table like this:
Value Formular
12 'SELECT Value+5 AS result'
15 'SELECT 4/Value+3 AS result'
16 'SELECT 5 AS result'
So, there are SQL-Statemants (as nvarchar(max)) in the Formular-Column. Now i need to calc for each row the result.
Current approach is a WHILE with cursor and handle each row for itself.
We need to use a temp-table for each row, because we were unable to find a better solution, how to get the result from the exec. Like:
declare @Value decimal(18,4);
create table #t(val decimal(18,4))
insert into #t exec(@formular)
select val from #t
We have >100'000 such rows, and this takes about ~2h do compute. (The formulas and values of course complexer, than in the example given)
Is there any possibility to get something like
SELECT Value, exec(Formular) as result FROM calctable
Thanks
| 0 |
9,396,323 | 02/22/2012 14:03:19 | 662,605 | 12/20/2010 17:40:54 | 1,176 | 50 | Twitter request token invalid on iOS | I am using Twitter+OAuth which uses MGTwitterEngine and SAOAuthTwitterEngine.
My app works great in the simulator, and on iPhone / iPod, I've only got iOS 5 to test on devices but I've set up my code so that if there is no twitter account in the system, or the app cannot use it, it uses this "fallback".
The problem is I am getting the following error message:
"The request token for this page is invalid. [...]"
Please note that this is before we even get to OAuth or anything API... This occurs in the modal web view that pops up to "authorise" the application with your login.
As I said, works great everywhere although I can run into this from time to time on the iPhone .
Please help.
PS: I am aware of other posts such as
https://dev.twitter.com/discussions/4849
or
http://stackoverflow.com/questions/8090527/oauth-access-token-fails-while-accessing-twitter-from-ios-5
But it seems I can't find a fix, I already made sure I am using https
![enter image description here][1]
![enter image description here][2]
[1]: http://i.stack.imgur.com/t2gPf.png
[2]: http://i.stack.imgur.com/iPuUG.png | ios | api | twitter | oauth | null | 06/12/2012 11:44:41 | too localized | Twitter request token invalid on iOS
===
I am using Twitter+OAuth which uses MGTwitterEngine and SAOAuthTwitterEngine.
My app works great in the simulator, and on iPhone / iPod, I've only got iOS 5 to test on devices but I've set up my code so that if there is no twitter account in the system, or the app cannot use it, it uses this "fallback".
The problem is I am getting the following error message:
"The request token for this page is invalid. [...]"
Please note that this is before we even get to OAuth or anything API... This occurs in the modal web view that pops up to "authorise" the application with your login.
As I said, works great everywhere although I can run into this from time to time on the iPhone .
Please help.
PS: I am aware of other posts such as
https://dev.twitter.com/discussions/4849
or
http://stackoverflow.com/questions/8090527/oauth-access-token-fails-while-accessing-twitter-from-ios-5
But it seems I can't find a fix, I already made sure I am using https
![enter image description here][1]
![enter image description here][2]
[1]: http://i.stack.imgur.com/t2gPf.png
[2]: http://i.stack.imgur.com/iPuUG.png | 3 |
5,425,626 | 03/24/2011 21:15:43 | 602,524 | 02/04/2011 02:07:31 | 43 | 0 | Program hanging while running, compiles well. | void dfsvisit(int a[][30], int i, const char *c[])
{
/* removed code */
c[i]="gray";
/* removed code */
if(c[a[i][v]]=="white")
{
/* removed code */
}
c[i]="black";
/* removed code */
}
int main()
{
int a[][30]={{1, 2}},{4, 8},{5, 16, 21}};
const char *c[30];
/* removed code */
for(i=1;i<=30;u++)
if(c[i]=="white")
dfsvisit(a,i,c);
return 0;
}
Just want to make sure if I am using `const char c` correct? If yes, where else have I done the mistake? I am trying to run it on codeblocks. It compiles well, but when I try to run it, it shows program has stopped working.
Thanks.
| c++ | hanging | const-char | null | null | null | open | Program hanging while running, compiles well.
===
void dfsvisit(int a[][30], int i, const char *c[])
{
/* removed code */
c[i]="gray";
/* removed code */
if(c[a[i][v]]=="white")
{
/* removed code */
}
c[i]="black";
/* removed code */
}
int main()
{
int a[][30]={{1, 2}},{4, 8},{5, 16, 21}};
const char *c[30];
/* removed code */
for(i=1;i<=30;u++)
if(c[i]=="white")
dfsvisit(a,i,c);
return 0;
}
Just want to make sure if I am using `const char c` correct? If yes, where else have I done the mistake? I am trying to run it on codeblocks. It compiles well, but when I try to run it, it shows program has stopped working.
Thanks.
| 0 |
8,822,745 | 01/11/2012 16:19:22 | 469,029 | 10/07/2010 11:47:22 | 507 | 26 | Spring Load Time Weaving in Eclipse RCP | I'm trying to use Spring's load-time-weaving capabilities with `@Configurable` within an Eclipse RCP application. I am using Spring OSGI Extender to load my application context.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="...">
<context:annotation-config />
<context:load-time-weaver />
<context:spring-configured />
</beans>
The application gets created all right, but when I try to annotate a class not managed by Spring (in my case an SWT Dialog) I get the following exception:
Exception in thread "SpringOsgiExtenderThread-2" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar
at org.springframework.context.weaving.DefaultContextLoadTimeWeaver.setBeanClassLoader(DefaultContextLoadTimeWeaver.java:93)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1443)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 13 more
I have tried starting the Application with -javaagent:... in the VM settings, to no avail.
Does anyone have experience with this?
Thanks a lot! | spring | eclipse-rcp | aspectj | null | null | null | open | Spring Load Time Weaving in Eclipse RCP
===
I'm trying to use Spring's load-time-weaving capabilities with `@Configurable` within an Eclipse RCP application. I am using Spring OSGI Extender to load my application context.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="...">
<context:annotation-config />
<context:load-time-weaver />
<context:spring-configured />
</beans>
The application gets created all right, but when I try to annotate a class not managed by Spring (in my case an SWT Dialog) I get the following exception:
Exception in thread "SpringOsgiExtenderThread-2" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: ClassLoader [org.springframework.osgi.util.BundleDelegatingClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar
at org.springframework.context.weaving.DefaultContextLoadTimeWeaver.setBeanClassLoader(DefaultContextLoadTimeWeaver.java:93)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1443)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 13 more
I have tried starting the Application with -javaagent:... in the VM settings, to no avail.
Does anyone have experience with this?
Thanks a lot! | 0 |
4,064,229 | 10/31/2010 17:39:00 | 492,894 | 10/31/2010 17:39:00 | 1 | 0 | svn lock branch | can i block commit operation possibility to selected branch | svn | null | null | null | null | null | open | svn lock branch
===
can i block commit operation possibility to selected branch | 0 |
10,089,142 | 04/10/2012 12:50:03 | 1,140,326 | 01/10/2012 07:33:38 | 98 | 2 | Converting hours and minutes column in dataframe in time format | I have a dataframe containing 3 columns including minutes and hours.
I want to convert these columsn namely mintutes and column in time format
given Data drame
Score Hour Min
10 10 56
23 17 01
desired
score time
10 10:56:00
23 17:01:00
| r | null | null | null | null | null | open | Converting hours and minutes column in dataframe in time format
===
I have a dataframe containing 3 columns including minutes and hours.
I want to convert these columsn namely mintutes and column in time format
given Data drame
Score Hour Min
10 10 56
23 17 01
desired
score time
10 10:56:00
23 17:01:00
| 0 |
10,808,993 | 05/30/2012 01:43:20 | 973,939 | 09/30/2011 22:30:31 | 470 | 5 | connecting to multiple sql server databases from java | I have some data to be read from multiple sql server databases (like 200). There will be like 10 tables in each of these databases where I need to read the data from, how can I do this in the best possible way using java?
Thanks in advance | java | sql-server-2008 | multiple-databases | null | null | null | open | connecting to multiple sql server databases from java
===
I have some data to be read from multiple sql server databases (like 200). There will be like 10 tables in each of these databases where I need to read the data from, how can I do this in the best possible way using java?
Thanks in advance | 0 |
9,013,009 | 01/26/2012 01:44:01 | 315,168 | 04/13/2010 06:18:48 | 4,024 | 201 | PloneFormGen and fail-safe email send | I'd like to have a PloneFormGen form which both
* Writes the entry to database for CSV export
* Sends out email
Is it so that if email send fails the transaction is rolled back and also no entry is written? How one can configure PloneFormGen or email output so that the database entry is written and transaction completes even if SMTP fails? | smtp | plone | ploneformgen | null | null | null | open | PloneFormGen and fail-safe email send
===
I'd like to have a PloneFormGen form which both
* Writes the entry to database for CSV export
* Sends out email
Is it so that if email send fails the transaction is rolled back and also no entry is written? How one can configure PloneFormGen or email output so that the database entry is written and transaction completes even if SMTP fails? | 0 |
10,947,373 | 06/08/2012 10:44:54 | 1,381,734 | 05/08/2012 10:00:01 | 22 | 1 | error 1001 in installation of Dynamics ax 2012 | IN installation of Dynamics AX 2012 i have an error : " error 1001 "
i try to install many time but evry time i have this error and this ligne in log file :
>>Install: Error during Setup:
2012-06-08 11:27:25Z >>Install: An error occurred during the install custom action step within the AOS Server installer
2012-06-08 11:27:26Z >>Install: Only the first eight characters of a custom log name are significant, and there is already another log on the system using the first eight characters of the name given. Name given: 'Microsoft Dynamics AX Workflow', name of existing log: 'Microsoft Web Deploy'.
2012-06-08 11:27:26Z >>Install: at System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData)
2012-06-08 11:27:26Z at Microsoft.Dynamics.Setup.AosServer.CreateEventSourceIfItDoesNotExistForAxWorkflowRuntimeAos()
2012-06-08 11:27:26Z at Microsoft.Dynamics.Setup.AosServer.Install(InstallDriver installDriver)
2012-06-08 11:27:26Z at Microsoft.Dynamics.Setup.InstallDriver.Install(IDictionary stateSaver)
2012-06-08 11:27:26Z >>Install: AOS Server End 08/06/2012 11:26:51
2012-06-08 11:27:26Z Rolling back assembly 'C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\Microsoft.Dynamics.Setup.AosServer.dll'.
2012-06-08 11:27:26Z Affected parameters are:
2012-06-08 11:27:26Z aosinstancename = MicrosoftDynamicsAX
2012-06-08 11:27:26Z bypasswarnings = 0
2012-06-08 11:27:26Z assemblypath = C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\Microsoft.Dynamics.Setup.AosServer.dll
2012-06-08 11:27:26Z aosport = 2712
2012-06-08 11:27:26Z aosexe = Ax32Serv
2012-06-08 11:27:26Z bindir = C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\#
2012-06-08 11:27:26Z aosinstancenum = 01
2012-06-08 11:27:26Z installtype = notransaction
2012-06-08 11:27:26Z logfile = C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\Microsoft.Dynamics.Setup.AosServer.InstallLog
2012-06-08 11:27:26Z aosnettcpport = 8201
2012-06-08 11:27:26Z aoswsdlport = 8101
2012-06-08 11:27:26Z setuplanguage =
2012-06-08 11:27:26Z uilevel = 3
2012-06-08 11:27:26Z action = rollback
2012-06-08 11:27:26Z aosaccount = NT AUTHORITY\NETWORKSERVICE
2012-06-08 11:27:26Z
2012-06-08 11:27:26Z >>Rollback: AOS Server Start 08/06/2012 11:27:01
2012-06-08 11:27:26Z >>Rollback: Attempting to remove AOS Server which may have just been partially or fully installed
2012-06-08 11:27:26Z >>Rollback: netsh.exe http delete urlacl url=http://+:8101/DynamicsAx/Services/
2012-06-08 11:27:26Z >>Rollback:
2012-06-08 11:27:26Z URL reservation successfully deleted
2012-06-08 11:27:26Z
2012-06-08 11:27:26Z >>Rollback: Generating firewall rule name: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (RPC)'
2012-06-08 11:27:26Z >>Rollback: Closed port: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (RPC)'.
2012-06-08 11:27:26Z >>Rollback: Generating firewall rule name: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (NetTCP)'
2012-06-08 11:27:26Z >>Rollback: Closed port: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (NetTCP)'.
2012-06-08 11:27:26Z >>Rollback: Generating firewall rule name: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (WSDL)'
2012-06-08 11:27:26Z >>Rollback: Closed port: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (WSDL)'.
2012-06-08 11:27:26Z >>Rollback: Unlodctr "Dynamics Server"
2012-06-08 11:27:26Z >>Rollback:
2012-06-08 11:27:26Z Counters for Dynamics Server have not been installed yet
2012-06-08 11:27:26Z >>Rollback: During Setup of AOS Server an error occurred. Program run: Unlodctr. Parameters: "Dynamics Server"
2012-06-08 11:27:26Z >>Rollback: <<<===== WARNING =====>>>>
2012-06-08 11:27:26Z >>Rollback: An error occurred running lodctr.exe. The following command must be run manually in order for the AOS to run properly: Unlodctr "Dynamics Server"
2012-06-08 11:27:26Z >>Rollback: AOS Server End 08/06/2012 11:27:02
2012-06-08 11:27:26Z Common Property Install Path set to 'C:\Program Files\Microsoft Dynamics AX\60'.
2012-06-08 11:27:26Z Installation Path retrieved from registry. Value: 'C:\Program Files\Microsoft Dynamics AX\60'
2012-06-08 11:27:26Z ******************************************************************************************************
2012-06-08 11:27:26Z Component installation task stopped due to an error.
2012-06-08 11:27:26Z ******************************************************************************************************
2012-06-08 11:27:27Z S260FinishedInfo | axapta | dynamics-ax | ax | dynamics-ax-2012 | null | 06/10/2012 16:13:38 | off topic | error 1001 in installation of Dynamics ax 2012
===
IN installation of Dynamics AX 2012 i have an error : " error 1001 "
i try to install many time but evry time i have this error and this ligne in log file :
>>Install: Error during Setup:
2012-06-08 11:27:25Z >>Install: An error occurred during the install custom action step within the AOS Server installer
2012-06-08 11:27:26Z >>Install: Only the first eight characters of a custom log name are significant, and there is already another log on the system using the first eight characters of the name given. Name given: 'Microsoft Dynamics AX Workflow', name of existing log: 'Microsoft Web Deploy'.
2012-06-08 11:27:26Z >>Install: at System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData)
2012-06-08 11:27:26Z at Microsoft.Dynamics.Setup.AosServer.CreateEventSourceIfItDoesNotExistForAxWorkflowRuntimeAos()
2012-06-08 11:27:26Z at Microsoft.Dynamics.Setup.AosServer.Install(InstallDriver installDriver)
2012-06-08 11:27:26Z at Microsoft.Dynamics.Setup.InstallDriver.Install(IDictionary stateSaver)
2012-06-08 11:27:26Z >>Install: AOS Server End 08/06/2012 11:26:51
2012-06-08 11:27:26Z Rolling back assembly 'C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\Microsoft.Dynamics.Setup.AosServer.dll'.
2012-06-08 11:27:26Z Affected parameters are:
2012-06-08 11:27:26Z aosinstancename = MicrosoftDynamicsAX
2012-06-08 11:27:26Z bypasswarnings = 0
2012-06-08 11:27:26Z assemblypath = C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\Microsoft.Dynamics.Setup.AosServer.dll
2012-06-08 11:27:26Z aosport = 2712
2012-06-08 11:27:26Z aosexe = Ax32Serv
2012-06-08 11:27:26Z bindir = C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\#
2012-06-08 11:27:26Z aosinstancenum = 01
2012-06-08 11:27:26Z installtype = notransaction
2012-06-08 11:27:26Z logfile = C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Bin\Microsoft.Dynamics.Setup.AosServer.InstallLog
2012-06-08 11:27:26Z aosnettcpport = 8201
2012-06-08 11:27:26Z aoswsdlport = 8101
2012-06-08 11:27:26Z setuplanguage =
2012-06-08 11:27:26Z uilevel = 3
2012-06-08 11:27:26Z action = rollback
2012-06-08 11:27:26Z aosaccount = NT AUTHORITY\NETWORKSERVICE
2012-06-08 11:27:26Z
2012-06-08 11:27:26Z >>Rollback: AOS Server Start 08/06/2012 11:27:01
2012-06-08 11:27:26Z >>Rollback: Attempting to remove AOS Server which may have just been partially or fully installed
2012-06-08 11:27:26Z >>Rollback: netsh.exe http delete urlacl url=http://+:8101/DynamicsAx/Services/
2012-06-08 11:27:26Z >>Rollback:
2012-06-08 11:27:26Z URL reservation successfully deleted
2012-06-08 11:27:26Z
2012-06-08 11:27:26Z >>Rollback: Generating firewall rule name: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (RPC)'
2012-06-08 11:27:26Z >>Rollback: Closed port: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (RPC)'.
2012-06-08 11:27:26Z >>Rollback: Generating firewall rule name: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (NetTCP)'
2012-06-08 11:27:26Z >>Rollback: Closed port: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (NetTCP)'.
2012-06-08 11:27:26Z >>Rollback: Generating firewall rule name: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (WSDL)'
2012-06-08 11:27:26Z >>Rollback: Closed port: 'Dynamics AX 6.0 - MicrosoftDynamicsAX (WSDL)'.
2012-06-08 11:27:26Z >>Rollback: Unlodctr "Dynamics Server"
2012-06-08 11:27:26Z >>Rollback:
2012-06-08 11:27:26Z Counters for Dynamics Server have not been installed yet
2012-06-08 11:27:26Z >>Rollback: During Setup of AOS Server an error occurred. Program run: Unlodctr. Parameters: "Dynamics Server"
2012-06-08 11:27:26Z >>Rollback: <<<===== WARNING =====>>>>
2012-06-08 11:27:26Z >>Rollback: An error occurred running lodctr.exe. The following command must be run manually in order for the AOS to run properly: Unlodctr "Dynamics Server"
2012-06-08 11:27:26Z >>Rollback: AOS Server End 08/06/2012 11:27:02
2012-06-08 11:27:26Z Common Property Install Path set to 'C:\Program Files\Microsoft Dynamics AX\60'.
2012-06-08 11:27:26Z Installation Path retrieved from registry. Value: 'C:\Program Files\Microsoft Dynamics AX\60'
2012-06-08 11:27:26Z ******************************************************************************************************
2012-06-08 11:27:26Z Component installation task stopped due to an error.
2012-06-08 11:27:26Z ******************************************************************************************************
2012-06-08 11:27:27Z S260FinishedInfo | 2 |
3,673,900 | 09/09/2010 05:02:44 | 443,075 | 09/09/2010 05:02:44 | 1 | 0 | How to change the server response header in asp.net2.0 with IIS6.0 server | How to modify the server value of response header through code behind using asp.net 2.0 with IIS6.0 server.
I have tried Response.Headers.Set("XYZ","ABC");
But it displays integrated pipeline error....
| asp.net | null | null | null | null | null | open | How to change the server response header in asp.net2.0 with IIS6.0 server
===
How to modify the server value of response header through code behind using asp.net 2.0 with IIS6.0 server.
I have tried Response.Headers.Set("XYZ","ABC");
But it displays integrated pipeline error....
| 0 |
160,106 | 10/01/2008 22:45:22 | 16,120 | 09/17/2008 14:49:56 | 98 | 9 | How to implement find as you type on a TComboBox descendant | What is the correct way to implement the "find as you type" behavior on a TComboBox descendant component whose style is csOwnerDrawFixed? | delphi | vlc | gui | custom-component | null | 01/26/2012 21:23:35 | not a real question | How to implement find as you type on a TComboBox descendant
===
What is the correct way to implement the "find as you type" behavior on a TComboBox descendant component whose style is csOwnerDrawFixed? | 1 |
1,612,798 | 10/23/2009 11:22:10 | 137,348 | 07/13/2009 11:01:58 | 72 | 1 | Static field and Object reference not set to an instance of an object | I have a static field in a non static class.
public class DBtools
{
public static string ConString ="XXXXXXXXX";
}
This field is assigned to property in the code.
SqlDataSource1.ConnectionString = DBtools.ConString;
But after i run this app I'm getting a error **Object reference not set to an instance of an object**
How come this is happening? It's a static field.
| c# | .net | stat | null | null | null | open | Static field and Object reference not set to an instance of an object
===
I have a static field in a non static class.
public class DBtools
{
public static string ConString ="XXXXXXXXX";
}
This field is assigned to property in the code.
SqlDataSource1.ConnectionString = DBtools.ConString;
But after i run this app I'm getting a error **Object reference not set to an instance of an object**
How come this is happening? It's a static field.
| 0 |
4,199,492 | 11/16/2010 22:04:06 | 510,119 | 11/16/2010 22:04:06 | 1 | 0 | What is the problem my number to text c# code? | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SayiyiYaziyaCevirme
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void BasamakKontrol()
{
if ((txtSayi.Text.Length>7))
{
MessageBox.Show("Sayı basamağı 7'den Büyük.HESAPLAMAZ!!!");
}
}
public void SayiyiOku()
{
try
{
int birler, onlar, yuzler, binler, onbinler, yuzbinler, milyonlar;
int sayi = Convert.ToInt32(txtSayi.Text);
int[] dizi=new int[8];
for (int j = 0; j < txtSayi.Text.Length; j++)
{
dizi[j] = ((sayi / (10 ^ (txtSayi.Text.Length-1 - (txtSayi.Text.Length-1 - j))) % 10));
}
if(txtSayi.Text.Length!=7)
{
for (int i = 6; i >=txtSayi.Text.Length; i--)
{
dizi[i]=0;
}
}
birler = dizi[0];
onlar = dizi[1];
yuzler = dizi[2];
binler = dizi[3];
onbinler = dizi[4];
yuzbinler = dizi[5];
milyonlar = dizi[6];
string[] birlik = { "", "Bir", "İki", "Üç", "Dört", "Beş", "Altı", "Yedi", "Sekiz", "Dokuz" };
string[] Onluk = { "", "On", "Yirmi", "Otuz", "Kırk", "Elli", "Altmış", "Yetmiş", "Seksen", "Doksan" };
string[] Yuzluk = { "", "Yüz", "İkiyüz", "Üçyüz", "Dörtyüz", "Beşyüz", "Altıyüz", "Yediyüz", "Sekizyüz", "Dokuzyüz" };
string[] binlik = { "", "Bin", "İkibin", "Üçbin", "Dörtbin", "Beşbin", "Altıbin", "Yedibin", "Sekizbin", "Dokuzbin" };
string[] onbinlik = { "", "On", "Yirmi", "Otuz", "Kırk", "Elli", "Altmış", "Yetmiş", "Seksen", "Doksan" };
string[] yuzbinlik = { "", "Yüz", "İkiyüz", "Üçyüz", "Dörtyüz", "Beşyüz", "Altıyüz", "Yediyüz", "Sekizyüz", "Dokuzyüz" };
string[] milyonluk = { "", "Birmilyon", "İkimilyon", "Üçmilyon", "Dörtmilyon", "Beşmilyon", "Altımilyon", "Yedimilyon", "Sekizmilyon", "Dokuzmilyon" };
lblYazi.Text = milyonluk[milyonlar] + " " + yuzbinlik[yuzbinler] + onbinlik[onbinler] + " " + binlik[binler] + " " + Yuzluk[yuzler] + " " + Onluk[onlar] + " " + birlik[birler];
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
private void btnHesapla_Click(object sender, EventArgs e)
{
BasamakKontrol();
SayiyiOku();
}
}
} | c# | null | null | null | null | 11/18/2010 17:08:50 | not a real question | What is the problem my number to text c# code?
===
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SayiyiYaziyaCevirme
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void BasamakKontrol()
{
if ((txtSayi.Text.Length>7))
{
MessageBox.Show("Sayı basamağı 7'den Büyük.HESAPLAMAZ!!!");
}
}
public void SayiyiOku()
{
try
{
int birler, onlar, yuzler, binler, onbinler, yuzbinler, milyonlar;
int sayi = Convert.ToInt32(txtSayi.Text);
int[] dizi=new int[8];
for (int j = 0; j < txtSayi.Text.Length; j++)
{
dizi[j] = ((sayi / (10 ^ (txtSayi.Text.Length-1 - (txtSayi.Text.Length-1 - j))) % 10));
}
if(txtSayi.Text.Length!=7)
{
for (int i = 6; i >=txtSayi.Text.Length; i--)
{
dizi[i]=0;
}
}
birler = dizi[0];
onlar = dizi[1];
yuzler = dizi[2];
binler = dizi[3];
onbinler = dizi[4];
yuzbinler = dizi[5];
milyonlar = dizi[6];
string[] birlik = { "", "Bir", "İki", "Üç", "Dört", "Beş", "Altı", "Yedi", "Sekiz", "Dokuz" };
string[] Onluk = { "", "On", "Yirmi", "Otuz", "Kırk", "Elli", "Altmış", "Yetmiş", "Seksen", "Doksan" };
string[] Yuzluk = { "", "Yüz", "İkiyüz", "Üçyüz", "Dörtyüz", "Beşyüz", "Altıyüz", "Yediyüz", "Sekizyüz", "Dokuzyüz" };
string[] binlik = { "", "Bin", "İkibin", "Üçbin", "Dörtbin", "Beşbin", "Altıbin", "Yedibin", "Sekizbin", "Dokuzbin" };
string[] onbinlik = { "", "On", "Yirmi", "Otuz", "Kırk", "Elli", "Altmış", "Yetmiş", "Seksen", "Doksan" };
string[] yuzbinlik = { "", "Yüz", "İkiyüz", "Üçyüz", "Dörtyüz", "Beşyüz", "Altıyüz", "Yediyüz", "Sekizyüz", "Dokuzyüz" };
string[] milyonluk = { "", "Birmilyon", "İkimilyon", "Üçmilyon", "Dörtmilyon", "Beşmilyon", "Altımilyon", "Yedimilyon", "Sekizmilyon", "Dokuzmilyon" };
lblYazi.Text = milyonluk[milyonlar] + " " + yuzbinlik[yuzbinler] + onbinlik[onbinler] + " " + binlik[binler] + " " + Yuzluk[yuzler] + " " + Onluk[onlar] + " " + birlik[birler];
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
private void btnHesapla_Click(object sender, EventArgs e)
{
BasamakKontrol();
SayiyiOku();
}
}
} | 1 |
9,863,970 | 03/25/2012 20:55:35 | 1,175,065 | 01/28/2012 10:43:08 | 67 | 1 | Fuzzy string matching with one mismatch allowed | There are various fuzzy string matching algorithm available. Which algorithm is best if only one mismatch allowed and string are too large at max 100000 characters. As a input two strings are given. | java | string | fuzzy-comparison | null | null | 03/27/2012 14:53:20 | not constructive | Fuzzy string matching with one mismatch allowed
===
There are various fuzzy string matching algorithm available. Which algorithm is best if only one mismatch allowed and string are too large at max 100000 characters. As a input two strings are given. | 4 |
9,332,090 | 02/17/2012 16:38:53 | 1,216,721 | 02/17/2012 16:33:03 | 1 | 0 | PowerShell - Remotely Run Windows Commands | We have a lab of computers setup in a workgroup. They are running Windows 7. I am trying to figure out a way to use PowerShell to run a Windows command on these machines. My question is more specifically around how can I access these machines remotely given that they are part of a workgroup and not our domain? We don't have remote PowerShell access set up yet and I haven't really used it either. I was thinking of WMI, but wasn't sure how I could do this given they aren't part of our domain. If someone could point me to some code that could run something like hostname, ping, ipconfig on a remote machine in a work group that would be great! Specifically we are trying to set the KMS server for our lab machines using: slmgr.vbs /skms 192.168.5.10
Thanks!
Seag33k | powershell | null | null | null | null | 02/20/2012 06:01:43 | off topic | PowerShell - Remotely Run Windows Commands
===
We have a lab of computers setup in a workgroup. They are running Windows 7. I am trying to figure out a way to use PowerShell to run a Windows command on these machines. My question is more specifically around how can I access these machines remotely given that they are part of a workgroup and not our domain? We don't have remote PowerShell access set up yet and I haven't really used it either. I was thinking of WMI, but wasn't sure how I could do this given they aren't part of our domain. If someone could point me to some code that could run something like hostname, ping, ipconfig on a remote machine in a work group that would be great! Specifically we are trying to set the KMS server for our lab machines using: slmgr.vbs /skms 192.168.5.10
Thanks!
Seag33k | 2 |
8,164,141 | 11/17/2011 08:32:28 | 1,027,043 | 11/03/2011 05:55:55 | 1 | 0 | Building IDE for Internet explorer for selenium | I want to build the IDE for the Selenium for the recording and replaying in Internet Explorer same like the mozilla firefox.
please suggest me any direction..
Thanks in advance | selenium | null | null | null | null | 11/17/2011 12:10:50 | not constructive | Building IDE for Internet explorer for selenium
===
I want to build the IDE for the Selenium for the recording and replaying in Internet Explorer same like the mozilla firefox.
please suggest me any direction..
Thanks in advance | 4 |
3,494,555 | 08/16/2010 15:19:53 | 71,772 | 02/27/2009 08:35:52 | 40 | 10 | tinyMCE to AS3 htmlText | I'm using tinyMCE to edit/markup text in a Zend Framework backend.
I'd like to use the generated HTML in a Flash AS3 Application.
The problem is that Flash doesn't support attributes in `<span>`'s, `<em>` tags, `<strong>` tags etc.
I guess there are two possibilities here:
- change the tinyMCE config so it uses font-tags instead of span's, `<b>` instead of `<strong>`,...
- Replace all the HTML-tags in Flash with Regex.
Any help would be welcome.
so this is the original html generated by tinyMCE:
<span style="color:#FF0000; font-size:24;">text, and <strong>bold text</strong></span>
And this is what I need in Flash:
<font size='24' color='#FF0000'>text and <b>bold text</b></font>
| actionscript-3 | tinymce | htmltext | null | null | null | open | tinyMCE to AS3 htmlText
===
I'm using tinyMCE to edit/markup text in a Zend Framework backend.
I'd like to use the generated HTML in a Flash AS3 Application.
The problem is that Flash doesn't support attributes in `<span>`'s, `<em>` tags, `<strong>` tags etc.
I guess there are two possibilities here:
- change the tinyMCE config so it uses font-tags instead of span's, `<b>` instead of `<strong>`,...
- Replace all the HTML-tags in Flash with Regex.
Any help would be welcome.
so this is the original html generated by tinyMCE:
<span style="color:#FF0000; font-size:24;">text, and <strong>bold text</strong></span>
And this is what I need in Flash:
<font size='24' color='#FF0000'>text and <b>bold text</b></font>
| 0 |
6,063,287 | 05/19/2011 18:35:40 | 478,636 | 10/17/2010 16:41:03 | 304 | 2 | Stored Procedures in SQL | I am well aware of SQL statements such as select, insert, update and delete. However I am new to stored procedures.
I am using SQL Management Studio Express.
Any example? Like Registration?
| sql | stored-procedures | null | null | null | 05/19/2011 18:49:53 | not a real question | Stored Procedures in SQL
===
I am well aware of SQL statements such as select, insert, update and delete. However I am new to stored procedures.
I am using SQL Management Studio Express.
Any example? Like Registration?
| 1 |
4,848,710 | 01/31/2011 07:57:53 | 587,148 | 01/24/2011 07:14:40 | 1 | 0 | Asp.net Progress Bar | I am working on a project in which i post the deals regarding the clothing product. In the deal i set the buing limit of the product such i have shirt it price is $5 but if get 1oo item sale within the specified time i will sell the shirt in $4. In this senario need to use progress bar to show the status of deal such many items are booked for sale. Can any body tell is there a control in asp.net which i can use? | asp.net | null | null | null | null | 01/31/2011 11:54:48 | off topic | Asp.net Progress Bar
===
I am working on a project in which i post the deals regarding the clothing product. In the deal i set the buing limit of the product such i have shirt it price is $5 but if get 1oo item sale within the specified time i will sell the shirt in $4. In this senario need to use progress bar to show the status of deal such many items are booked for sale. Can any body tell is there a control in asp.net which i can use? | 2 |
10,573,930 | 05/13/2012 17:53:54 | 1,001,120 | 10/18/2011 12:47:17 | 32 | 0 | How to get main Activity class or class name of my application? | How to get main Activity class or class name of my application?
Thanks a lot! | android | null | null | null | null | null | open | How to get main Activity class or class name of my application?
===
How to get main Activity class or class name of my application?
Thanks a lot! | 0 |
3,061,979 | 06/17/2010 13:24:28 | 236,626 | 12/22/2009 06:45:30 | 71 | 1 | operator << overload c++ | how can i overload "<<" operator (for cout) so i could do "cout" to a class k | c++ | overloading | null | null | null | null | open | operator << overload c++
===
how can i overload "<<" operator (for cout) so i could do "cout" to a class k | 0 |
7,780,523 | 10/15/2011 20:41:45 | 963,701 | 09/25/2011 14:32:45 | 47 | 0 | different between c# and C++ in "for" Statement | why I cannt do this in c#
for ( i = 5, j = 10 ; i + j < 20; i++, j++ )
I manage to do it in c++ | c# | c++ | for-loop | null | null | 10/15/2011 21:06:23 | not a real question | different between c# and C++ in "for" Statement
===
why I cannt do this in c#
for ( i = 5, j = 10 ; i + j < 20; i++, j++ )
I manage to do it in c++ | 1 |
10,257,466 | 04/21/2012 08:32:04 | 1,348,051 | 04/21/2012 08:28:32 | 1 | 0 | Need help on the physics of angry-birds | As a school project i have taken up making an angry birds clone in matlab. After working on it a little bit, i have realized that perhaps i bit more then i could chew.
Currently i am working on the physics of it, and while i understand the mechanics behind the game (collisions, inertia and whatnot) i don't know how i will implement it in the game. I am new to programming but i like it and have caught on to it fairly quickly.
In angry birds we are dealing with collisions between several OBB's and i have an algorithm for detecting collisions. I have a function that checks all the corners of every box and looks to see if it is within another box. I realize this is not the best way to do it but since i couldn't visualize the separating axis theorem, i chose not to use it.
When the collision happens, the box is penetrating into another box, when this happens i do a liner interpolation between its previous point and the current point. I do this to all colliding points in one instance (this is my method to resolve multiple collisions). Using the interpolation i detect the first collision that takes place and i implement a collision response.
My issue currently is that when there is one box sitting on top of another, this method doesnt work so well, because at every instance the top box penetrates into the bottom one very slightly, and i bounce it back. This causes my entire thing to stop, because i go back in time, solve the collision, and then in the next instance the collision is happening again.
My question is, how do i solve this problem of multiple boxes sitting on top of one another.
I have looked at all of the articles on physics by http://www.wildbunny.co.uk and tried to understand his method but while i understand what he does, i have no clue how he does it. I also do not know any action script so much of his code is gibberish to me.
I have looked through several other guides on the internet but none of them seem to make sense to me.
Here is what would be of great help to me, if someone could tell me what sort of method is commonly used to implement the graphics of a game like angry-birds, specifically the multiple collisions method (is mine good enough or do i need to do speculative contacts like wildbunny talks about in his blog), and the box resting on box problem.
Is this project difficult to do withing two weeks? | matlab | physics | null | null | null | 04/21/2012 10:31:07 | not a real question | Need help on the physics of angry-birds
===
As a school project i have taken up making an angry birds clone in matlab. After working on it a little bit, i have realized that perhaps i bit more then i could chew.
Currently i am working on the physics of it, and while i understand the mechanics behind the game (collisions, inertia and whatnot) i don't know how i will implement it in the game. I am new to programming but i like it and have caught on to it fairly quickly.
In angry birds we are dealing with collisions between several OBB's and i have an algorithm for detecting collisions. I have a function that checks all the corners of every box and looks to see if it is within another box. I realize this is not the best way to do it but since i couldn't visualize the separating axis theorem, i chose not to use it.
When the collision happens, the box is penetrating into another box, when this happens i do a liner interpolation between its previous point and the current point. I do this to all colliding points in one instance (this is my method to resolve multiple collisions). Using the interpolation i detect the first collision that takes place and i implement a collision response.
My issue currently is that when there is one box sitting on top of another, this method doesnt work so well, because at every instance the top box penetrates into the bottom one very slightly, and i bounce it back. This causes my entire thing to stop, because i go back in time, solve the collision, and then in the next instance the collision is happening again.
My question is, how do i solve this problem of multiple boxes sitting on top of one another.
I have looked at all of the articles on physics by http://www.wildbunny.co.uk and tried to understand his method but while i understand what he does, i have no clue how he does it. I also do not know any action script so much of his code is gibberish to me.
I have looked through several other guides on the internet but none of them seem to make sense to me.
Here is what would be of great help to me, if someone could tell me what sort of method is commonly used to implement the graphics of a game like angry-birds, specifically the multiple collisions method (is mine good enough or do i need to do speculative contacts like wildbunny talks about in his blog), and the box resting on box problem.
Is this project difficult to do withing two weeks? | 1 |
5,994,796 | 05/13/2011 16:15:26 | 227,671 | 12/09/2009 03:31:44 | 5 | 0 | How to add Game Center in my game without changing my requirements? | I want to add Game Center in my game. It has requirements 3.2 now, but Game Center needs 4.1. How to upgrade last version of my game? I can't just upload new version of my game with Game Center because of differences in requirements. I can't resolve this problem, but I know that Doodle did this somehow. | iphone | ios4 | submit | requirements | game-center | null | open | How to add Game Center in my game without changing my requirements?
===
I want to add Game Center in my game. It has requirements 3.2 now, but Game Center needs 4.1. How to upgrade last version of my game? I can't just upload new version of my game with Game Center because of differences in requirements. I can't resolve this problem, but I know that Doodle did this somehow. | 0 |
10,958,429 | 06/09/2012 04:44:18 | 1,443,702 | 05/27/2012 12:08:50 | 1 | 0 | PHP SQL Display images | I've written a php code to display all the images. But there's is something wrong in the code and I can't fix it. It's kind of a syntax error but I've wasted hours over it and still mixing up the "quotes(')"..here's my php code:
while($row = mysql_fetch_array($display_query)){
print "<tr><td>".$row['itemid']."</td><td><img src="resources/wh/'.$row['itemid'].'.png"/></td><td>".$row['description']."</td><td>";
print "₹".$row['cost']."</td></tr>";
} | php | sql | image | null | null | null | open | PHP SQL Display images
===
I've written a php code to display all the images. But there's is something wrong in the code and I can't fix it. It's kind of a syntax error but I've wasted hours over it and still mixing up the "quotes(')"..here's my php code:
while($row = mysql_fetch_array($display_query)){
print "<tr><td>".$row['itemid']."</td><td><img src="resources/wh/'.$row['itemid'].'.png"/></td><td>".$row['description']."</td><td>";
print "₹".$row['cost']."</td></tr>";
} | 0 |
11,327,707 | 07/04/2012 10:57:49 | 628,918 | 02/22/2011 19:02:41 | 166 | 7 | What is the equivalent for a Hidden Markov Model in the WEKA toolkit? | I need to classify a datastream which comes from a sensor network consisting of 8 accelerometers. Each accelerometer gives me a X Y and Z value. Thus at each sample i have 8 x 3 = 24 acceleration values. I sample at about 30 hz and the performance time is about 0.5 seconds.
At first i thought of using a Hidden Markov model for this but it seems that the WEKA toolkit does not provide such a thing. What is the WEKA equivalent for this?
Thank you. | classification | sensor | weka | hidden-markov-models | null | null | open | What is the equivalent for a Hidden Markov Model in the WEKA toolkit?
===
I need to classify a datastream which comes from a sensor network consisting of 8 accelerometers. Each accelerometer gives me a X Y and Z value. Thus at each sample i have 8 x 3 = 24 acceleration values. I sample at about 30 hz and the performance time is about 0.5 seconds.
At first i thought of using a Hidden Markov model for this but it seems that the WEKA toolkit does not provide such a thing. What is the WEKA equivalent for this?
Thank you. | 0 |
2,366,305 | 03/02/2010 19:58:13 | 253,591 | 01/18/2010 23:12:39 | 158 | 3 | Update Item Lookup in Sharepoint Workflow | I have several lists, each has a workflow to its item created event that creates another item in a third list. Every workflow creates an item in that list. By the way, each list has different columns, so they're not identical.
Everything is fine up to this point. But i want to edit the previously inserted item (to the buffer list) when an item is updated in those list. I tried to create a GUID column in buffer list, set Current Item:GUID when creating a new item. And then in "update workflow", i've tried to use "Update List Item" action with the lookup: Current Item:GUID -> Buffer:GUID.
Obviously, it doesn't work.
Here is what it says in the workflow report:
*3/2/2010 2:48 PM* Error System Account Error updating a list item **List item not found**
Any ideas? | sharepoint | moss | 2007 | workflow | update | 05/06/2012 18:09:53 | off topic | Update Item Lookup in Sharepoint Workflow
===
I have several lists, each has a workflow to its item created event that creates another item in a third list. Every workflow creates an item in that list. By the way, each list has different columns, so they're not identical.
Everything is fine up to this point. But i want to edit the previously inserted item (to the buffer list) when an item is updated in those list. I tried to create a GUID column in buffer list, set Current Item:GUID when creating a new item. And then in "update workflow", i've tried to use "Update List Item" action with the lookup: Current Item:GUID -> Buffer:GUID.
Obviously, it doesn't work.
Here is what it says in the workflow report:
*3/2/2010 2:48 PM* Error System Account Error updating a list item **List item not found**
Any ideas? | 2 |
10,248,830 | 04/20/2012 15:09:41 | 1,062,411 | 11/23/2011 17:14:00 | 20 | 0 | Max-height will not scale site | I am able to get the width of my project to scale but not the height (tried in FireFox and Chrome and I understand IE will not work)
Heres the CSS I am using:
section.main
{
max-height: 100%; max-width: 100%; border: 1px solid black; width: 1000px; height: 800px;
}
| html | css | html5 | scale | responsive-design | null | open | Max-height will not scale site
===
I am able to get the width of my project to scale but not the height (tried in FireFox and Chrome and I understand IE will not work)
Heres the CSS I am using:
section.main
{
max-height: 100%; max-width: 100%; border: 1px solid black; width: 1000px; height: 800px;
}
| 0 |
9,265,929 | 02/13/2012 18:35:09 | 1,179,042 | 01/30/2012 21:36:01 | 1 | 2 | Tensor multiplication library | I am writing a scientific code in c which requires numerous tensor products, and higher-order tensor operations as well, e.g. contraction, kronecker product, etc. I am planning on implementing this myself using efficient algorithms as in the literature and employing a good BLAS library. I did some looking about and haven't really found anything for c (plenty for c++, python etc.). Am I missing something or has this really not been well implemented in c?
Thanks. | c | null | null | null | null | null | open | Tensor multiplication library
===
I am writing a scientific code in c which requires numerous tensor products, and higher-order tensor operations as well, e.g. contraction, kronecker product, etc. I am planning on implementing this myself using efficient algorithms as in the literature and employing a good BLAS library. I did some looking about and haven't really found anything for c (plenty for c++, python etc.). Am I missing something or has this really not been well implemented in c?
Thanks. | 0 |
10,487,411 | 05/07/2012 18:50:45 | 1,361,634 | 04/27/2012 16:58:23 | 1 | 0 | Overlapping Pattern Match warning with custom data types | I'm translating several programs from Standard ML to Haskell for a class, and I'm confused about the way Haskell is parsing this pattern matching.
I have this data type:
data Term = A | B
| F Term | G Term | H Term Term
| Var String
deriving (Show)
And this is part of the function I am defining:
unify :: [(Term, Term)] -> Bool
-- argument represents a list of term equations,
-- result indicates whether they have a solution
unify nil = True
unify ((A, A):eqns) = unify eqns
unify ((B, B):eqns) = unify eqns
unify ((F(t1), F(t2)):eqns) = unify((t1,t2):eqns)
unify ((G(t1), G(t2)):eqns) = unify((t1,t2):eqns)
unify ((H s1 t1, H s2 t2):eqns) = unify((s1,s2):(t1,t2):eqns)
unify ((Var v1, t):eqns) =
(case t of
Var v2 -> if v1 == v2 then unify(eqns)
else unify(map (substEqn v1 t) eqns)
_ -> unify(map (substEqn v1 t) eqns))
unify ((t, Var v):eqns) = unify(map (substEqn v t) eqns)
unify _ = False
ghci gives me this output when I import the module:
Warning: Pattern match(es) are overlapped
In an equation for `unify':
unify ((A, A) : eqns) = ...
unify ((B, B) : eqns) = ...
unify ((F (t1), F (t2)) : eqns) = ...
unify ((G (t1), G (t2)) : eqns) = ...
...
I certainly understand how pattern matching works, but I don't understand why Haskell considers these four arguments identical. They are different data types, so shouldn't they not be equivalent patterns? This worked in Standard ML, but something must be lost in translation. Thanks for the help! | homework | haskell | functional-programming | pattern-matching | null | null | open | Overlapping Pattern Match warning with custom data types
===
I'm translating several programs from Standard ML to Haskell for a class, and I'm confused about the way Haskell is parsing this pattern matching.
I have this data type:
data Term = A | B
| F Term | G Term | H Term Term
| Var String
deriving (Show)
And this is part of the function I am defining:
unify :: [(Term, Term)] -> Bool
-- argument represents a list of term equations,
-- result indicates whether they have a solution
unify nil = True
unify ((A, A):eqns) = unify eqns
unify ((B, B):eqns) = unify eqns
unify ((F(t1), F(t2)):eqns) = unify((t1,t2):eqns)
unify ((G(t1), G(t2)):eqns) = unify((t1,t2):eqns)
unify ((H s1 t1, H s2 t2):eqns) = unify((s1,s2):(t1,t2):eqns)
unify ((Var v1, t):eqns) =
(case t of
Var v2 -> if v1 == v2 then unify(eqns)
else unify(map (substEqn v1 t) eqns)
_ -> unify(map (substEqn v1 t) eqns))
unify ((t, Var v):eqns) = unify(map (substEqn v t) eqns)
unify _ = False
ghci gives me this output when I import the module:
Warning: Pattern match(es) are overlapped
In an equation for `unify':
unify ((A, A) : eqns) = ...
unify ((B, B) : eqns) = ...
unify ((F (t1), F (t2)) : eqns) = ...
unify ((G (t1), G (t2)) : eqns) = ...
...
I certainly understand how pattern matching works, but I don't understand why Haskell considers these four arguments identical. They are different data types, so shouldn't they not be equivalent patterns? This worked in Standard ML, but something must be lost in translation. Thanks for the help! | 0 |
4,847,318 | 01/31/2011 03:16:12 | 368,691 | 06/16/2010 21:23:46 | 84 | 11 | I get poor image quality when generating images with GD | I get poor image quality when trying to generate image using PHP GD. Here is the code http://paste2.org/p/1220178 I use it to convert a bunch of files into a merged/thumb images file. | php | image-processing | gd | null | null | null | open | I get poor image quality when generating images with GD
===
I get poor image quality when trying to generate image using PHP GD. Here is the code http://paste2.org/p/1220178 I use it to convert a bunch of files into a merged/thumb images file. | 0 |
9,313,832 | 02/16/2012 15:18:00 | 1,199,905 | 02/09/2012 14:51:52 | 1 | 0 | Audit Log in codeigniter | I have admin and subadmin concept in my site and i want to keep track of insertion,updation and deletion performed by the respective users. | php | codeigniter | null | null | null | 02/16/2012 19:27:57 | not a real question | Audit Log in codeigniter
===
I have admin and subadmin concept in my site and i want to keep track of insertion,updation and deletion performed by the respective users. | 1 |
10,678,594 | 05/21/2012 01:23:31 | 812,461 | 06/23/2011 14:57:43 | 560 | 14 | displaying the dynamically growing list | I have a array which is dynamically growing (number getting added every 1 sec). I have to split this list and display it in columns, **I am actually have problem displaying the list inside the ul and li(yes only ul and li no tables)**. The user can specify the max number of columns(Stop adding columns once there are this many) and the minimum column height(No added column may contain fewer than this many items). Also, the number of items in any added column must be either the same as, or 1 fewer than for the previous column. The output for max column =3 and min column height =3
![enter image description here][1]
What I was able to do so far is:
1. use set interval to add number every 1 sec
2. put the incoming numbers in an array like `[1] , [1,2] ... [1,2,3,4]` after 4 sec. This array is called **range**
3. split the main array (range) into sub array (**new_range**) for eg if the main array
(range) = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
new_range (after 1st loop) = [1, 2, 3, 4]
new_range (after 2nd loop) = [5, 6, 7]
new_range (after 3rd loop) = [8, 9, 10]
4. so now I need to display each new range vertically using ul and li so i tried doing something like `$('ul').append('<li>' + new_range[j] + '</li>');` were j is the new_range array index
**I have problem displaying the li items next to each other like the sample output using CSS, It would be great if someone could tell me how to display the li items after each iteration next to each other**
[**JS fiddle link**][2]
[1]: http://i.stack.imgur.com/5Khh3.png
[2]: http://jsfiddle.net/C2G9B/1/ | javascript | jquery | css | null | null | null | open | displaying the dynamically growing list
===
I have a array which is dynamically growing (number getting added every 1 sec). I have to split this list and display it in columns, **I am actually have problem displaying the list inside the ul and li(yes only ul and li no tables)**. The user can specify the max number of columns(Stop adding columns once there are this many) and the minimum column height(No added column may contain fewer than this many items). Also, the number of items in any added column must be either the same as, or 1 fewer than for the previous column. The output for max column =3 and min column height =3
![enter image description here][1]
What I was able to do so far is:
1. use set interval to add number every 1 sec
2. put the incoming numbers in an array like `[1] , [1,2] ... [1,2,3,4]` after 4 sec. This array is called **range**
3. split the main array (range) into sub array (**new_range**) for eg if the main array
(range) = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
new_range (after 1st loop) = [1, 2, 3, 4]
new_range (after 2nd loop) = [5, 6, 7]
new_range (after 3rd loop) = [8, 9, 10]
4. so now I need to display each new range vertically using ul and li so i tried doing something like `$('ul').append('<li>' + new_range[j] + '</li>');` were j is the new_range array index
**I have problem displaying the li items next to each other like the sample output using CSS, It would be great if someone could tell me how to display the li items after each iteration next to each other**
[**JS fiddle link**][2]
[1]: http://i.stack.imgur.com/5Khh3.png
[2]: http://jsfiddle.net/C2G9B/1/ | 0 |
4,242,012 | 11/22/2010 03:27:14 | 9,903 | 09/15/2008 20:22:33 | 345 | 31 | How do I add dates in Emacs using Emacs Lisp? | I want to use Emacs Lisp to perform math operations like add and difference on dates and times. | datetime | emacs | elisp | null | null | null | open | How do I add dates in Emacs using Emacs Lisp?
===
I want to use Emacs Lisp to perform math operations like add and difference on dates and times. | 0 |
2,558,250 | 04/01/2010 05:11:32 | 321,966 | 03/29/2010 10:10:10 | 1 | 0 | Data table multiple row selection | i am a small time web develper i am working on JSF project i am a front end designer and also interested in JSF i try 2 solve this issue in web app...
k my question is here...
i have a datatable with checkbox i want 2 select multiple row selection with css background color.... | jsf | datatable | checkbox | null | null | null | open | Data table multiple row selection
===
i am a small time web develper i am working on JSF project i am a front end designer and also interested in JSF i try 2 solve this issue in web app...
k my question is here...
i have a datatable with checkbox i want 2 select multiple row selection with css background color.... | 0 |
5,287,198 | 03/13/2011 03:26:42 | 413,979 | 08/07/2010 18:22:31 | 30 | 2 | Query on Licensing for binaries in Linux | Can i use wpa_supplicant 0.7.3 and openssl 0.9.8 together (i.e. with static linking of libssl.a and libcrypto.a into wpa_supplicant and wpa_passphrase)....I am not in a need to change the source code but have to change the make file settings for my cross compilation....This question looks to be bit silly but i am not sure about the GPL, LGPL and BSD terms and clauses...It will also be very helpful if some one can give pointers to understand these licenses easily :) | linux | licensing | openssl | null | null | 03/13/2011 06:31:10 | off topic | Query on Licensing for binaries in Linux
===
Can i use wpa_supplicant 0.7.3 and openssl 0.9.8 together (i.e. with static linking of libssl.a and libcrypto.a into wpa_supplicant and wpa_passphrase)....I am not in a need to change the source code but have to change the make file settings for my cross compilation....This question looks to be bit silly but i am not sure about the GPL, LGPL and BSD terms and clauses...It will also be very helpful if some one can give pointers to understand these licenses easily :) | 2 |
2,108,168 | 01/21/2010 09:41:55 | 128,816 | 06/25/2009 12:55:18 | 336 | 19 | UIWindows or UIViews | I need three different sections in my app: a login screen, a main screen, and one that takes place in landscape mode, all totally different. I saw Apple insists that an app should have one window, so I'm asking: what would be best to use for this? Three big windows, or views?
And how should the hierarchy look like? I don't have experience with layers for example. And while the login panel can go away after the user gets logged in, the other two must remain the same no matter which one of them is visible.
Also, no matter what your answer is, how exactly would the new UIWindow flow look like? How do I attach it instead of the initial one? do they have layers? etc.
Thanks! | iphone | cocoa | uikit | uiwindow | uiview | null | open | UIWindows or UIViews
===
I need three different sections in my app: a login screen, a main screen, and one that takes place in landscape mode, all totally different. I saw Apple insists that an app should have one window, so I'm asking: what would be best to use for this? Three big windows, or views?
And how should the hierarchy look like? I don't have experience with layers for example. And while the login panel can go away after the user gets logged in, the other two must remain the same no matter which one of them is visible.
Also, no matter what your answer is, how exactly would the new UIWindow flow look like? How do I attach it instead of the initial one? do they have layers? etc.
Thanks! | 0 |
4,333,702 | 12/02/2010 10:04:07 | 129,805 | 06/27/2009 11:51:28 | 396 | 4 | What causes the if-none-match request header field to become huge? | I have a problem with the If-none-match header which is sent to a Django CMS App, running through Apache2/mod_wsgi.
When editing the most used page, various users' browsers (Chrome and FF) get an error from Apache complaining that the if-none-match field is too long.
On inspection (through wireshark) the browser is sending about 8KiB if etags in this one header line. Clearing the browser's cache or restarting does not clear the problem.
I'm not sure what is at fault here.
Is the correct interpretation of the field's values as follows:
The browser is claiming to know about a few hundred previous versions of the page (which is credible, as the error only occurs on heavily 'get'ed rapidly-changing pages).
Is there a way of clearing out etags from FF or Chrome?
Thanks,
Chris.
| django | apache | etag | django-cms | null | null | open | What causes the if-none-match request header field to become huge?
===
I have a problem with the If-none-match header which is sent to a Django CMS App, running through Apache2/mod_wsgi.
When editing the most used page, various users' browsers (Chrome and FF) get an error from Apache complaining that the if-none-match field is too long.
On inspection (through wireshark) the browser is sending about 8KiB if etags in this one header line. Clearing the browser's cache or restarting does not clear the problem.
I'm not sure what is at fault here.
Is the correct interpretation of the field's values as follows:
The browser is claiming to know about a few hundred previous versions of the page (which is credible, as the error only occurs on heavily 'get'ed rapidly-changing pages).
Is there a way of clearing out etags from FF or Chrome?
Thanks,
Chris.
| 0 |
6,580,039 | 07/05/2011 08:47:45 | 829,309 | 07/05/2011 08:47:45 | 1 | 0 | Mysql database using php myadmin | I would like to make a database in phpmyadmin. I would like for people to go in and rate a certain vbs (vacation bible school). I would also like for churches to go in and see the ratings and comments.
How can I make a mysql database in phpmyadmin to | database | null | null | null | null | 07/05/2011 13:00:59 | not a real question | Mysql database using php myadmin
===
I would like to make a database in phpmyadmin. I would like for people to go in and rate a certain vbs (vacation bible school). I would also like for churches to go in and see the ratings and comments.
How can I make a mysql database in phpmyadmin to | 1 |
10,980,468 | 06/11/2012 12:52:15 | 1,399,620 | 05/16/2012 21:01:24 | 137 | 8 | How to send an e-mail in iOS Obj-C? | I want to send a mail with HTML-content when I click a UIButton.
How can I proceed ?
Thanks a lot | objective-c | ios | email | null | null | 06/11/2012 13:17:50 | not a real question | How to send an e-mail in iOS Obj-C?
===
I want to send a mail with HTML-content when I click a UIButton.
How can I proceed ?
Thanks a lot | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.