I can connect manually by doing:
M-x sql-postgres
and type the User, Database, Host, Server
I'd like to do something like:
(connect-foo (user "me")(database "bar")(host "earth"))
Hello everyone,
If the title was not clear, I will try to clarify what I am asking:
Imagine I have a variable called counter, I know I can see its current value by doing something like:
std::cout << counter << std::endl;
However, assume I have lots of variables and I don't know which I'm going to want to look at until runtime.
Does anyone know a way I can fetch the value of a variable by using its name, for example:
std::cout << valueOf("counter") << std::endl;
I feel being able to do this might make debugging large complex projects easier.
Thanks in advance for your time.
I have a user control that wraps a grid. I want to be able to set the underlying grid's data source, but through the user control, like this:
<my:CustomGrid DataSource="{Binding Path=CollectionView}" />
I have set this up in the grid like this:
private static readonly DependencyProperty DataSourceProperty
= DependencyProperty.Register("DataSource", typeof(IEnumerable), typeof(CustomGrid));
public IEnumerable DataSource
{
get { return (IEnumerable)GetValue(DataSourceProperty); }
set
{
SetValue(DataSourceProperty, value);
underlyingGrid.DataSource = value;
}
}
But this doesn't work (it doesn't give me an error either). The data source is never set. What am I missing?
How can I get value of each cells of grid using ArcObject?
Grid was created by
Spatial Analyst - Distance -Straight Line
I need to use this values for other operations.
Please, help me!
I am doing something wrong. At the end of this o is empty. I want to pass in a string such as a=3&zz=5 and do o.a and o.zz to retrieve 3 and 5. How do i generate this object?
function MakeIntoFields_sz(sz) {
var kvLs = sz.split('&');
var o = new Array();
for (var kv in kvLs) {
var kvA = kvLs[kv].split('=');
var k = '';
var v = '';
if (kvA.length > 0) {
k = kvA[0];
if (kvA.length > 1)
v = kvA[1];
o[k] = v;
}
}
return o;
};
i download appserv and install on my computer and set the default ip in my Default Gateway but when other people want to connect to my home server , they get the error of time out ! what am i going to do ? my server address :
http://192.168.210.230/
and my firewall is now off ! also my antivirus pls help me . Thanks in advance
Hi, my problem is that my variables are not working in javascript.
all variables need names without some character at the beginning, this is the stupid thing...Anyways, im trying to make a funtion that makes "select all checkboxes". It is not working so i looked at the page source/info and found out that the variables were not changing.
this is my input:
echo "<input onclick='checkAll(1);' type='checkbox' name='master'/><br/>";
My function:
function checkAll(i)
{
for(var i=1; i < <?php echo $num; ?>; i++)
{
if(document.demo.master[i].checked == true)
{
document.demo.message[i].checked = true;
}
else
{
document.demo.message[i].checked = false;
}
}
}
so yes that's it. I can tell you that i also tried without the <i> in: checkAll("i")
Thanks for the help.
EDIT: each checkbox for each messsage has this code:echo "<input style='margin-left:-15px;margin-top:20px;' type='checkbox' name='message' value='$rid' /><br/>";
silly php question...
why cant i do this?
echo Auth::getFullUser()[ 'country' ];
instead you have to do this
$user = Auth::getFullUser();
echo $user[ 'country' ];
I've just written a method that is called by multiple threads simultaneously and I need to keep track of when all the threads have completed, the code uses this pattern:
private void RunReport()
{
_reportsRunning++;
try
{
//code to run the report
}
finally
{
_reportsRunning--;
}
}
This is the only place within the code that _reportsRunning's value is changed, and the method takes about a second to run.
Occasionally when I have more than six or so threads running reports together the final result for _reportsRunning can get down to -1, if I wrap the calls to _runningReports++ and _runningReports-- in a lock then the behaviour appears to be correct and consistant.
So, to the question: When I was learning multithreading in C++ I was taught that you didn't need to synchronize calls to increment and decrement operations because they were always one assembly instruction and therefore it was impossible for the thread to be switched out mid-call. Was I taught correctly, and if so how come that doesn't hold true for C#?
Hi,
I'm running Drupal and Mediawiki on my server under the same domain. They are connected to each other with extensions/modules. Meaning if I log in to Mediawiki, it automatically logs into Drupal also.
Mediawiki has some extensions that filter the information shown on the page.
What I want to do is to show that filtered information from Mediawiki on my Drupal page. I'm trying to fetch the data with PHP cURL, but I'm not able to force it to use the login information.
How can I convert PHP's $_COOKIE into cURL cookie.txt format? I suppose after that I'm able to fetch the data from Mediawiki with the right permissions.
This is what print_r($_COOKIE) outputs:
[wiki_session] = gg05lhd6pcfs5g6iokhoo0gue7
[wikiUserName] = WikiSysop
[wikiLoggedOut] = 20100510110913
[wikiUserID] = 1
[wikiToken] = 52cdb19a7b4a43e5a2f86939e4f54941
Thanks for any help!
I've created a virtual folder for a folder residing at C:\Documents and Settings\..\Data
Remote users are able to see the base folder of the FTP site, but are unable to see the Virtual folder. Is sharing a folder in the path forbidden?
-zeekial
I'm working on a contest where users vote for contestants. Each contestant will have a bio.
I was wondering what would be the best way to approach this? Should I do this in php or javascript? Should I use a database to collect data? Should I use sqlite3? If I use sqlite3 how do i install that on my mac? I'm very new to all this but I'm a quick learner. Thanks for any advice.
I'm trying to bring a C++ library into C#, so naturally I am trying to make a C++/CLI project.
In visual studio I created a new project (Visual C++ project, class library). I then tried to make a test class out of the pre-generated "Class1"
namespace Test {
public ref class TestIt
{
public:
void DoWork()
{
System::Console::WriteLine("sup");
}
// TODO: Add your methods for this class here.
};
}
So I compile in and go to the build folder.... hrmm no .dll wetf?? There's a .dll.intermediate.manifest file, but no .dll.
So wut I did wrong?
I basically want to make things easier by just looping LinkButtons instead of making textfields because the linkbuttons have the rollovers already programmed.
But I have a lot of text and it just keeps going. I want it to wrap like I can do with textfields.
Thanks
Another annoying one for me but probably something simple.
I have a number of possible where clauses for a query based on user input, my question is how can I add these programmatically?
For instance:
wherequery = @"WHERE fieldname = @p_FieldName AND ";
if (txtValue.textLength > 0){
wherequery += "fieldname2 = @p_FieldName2 AND ";
}
query = @"SELECT * FROM tabe" + wherequery;
sql = connection.CreateCommand();
sql.CommandText = query;
How would I go about doing the parameters for that? I've tried ArrayLists, Dictionaries and a few other methods but can't find a way of doing it. Ideally I'd want to do something like this:
SqlParameter[] sqlparams;
wherequery = @"WHERE fieldname = @p_FieldName AND ";
if (txtValue.textLength > 0){
wherequery += "fieldname2 = @p_FieldName2 AND ";
sqlparams.Parameters.Add("@p_FieldName2 ", SqlDbType.VarChar).Value = txtValue.text;
}
query = @"SELECT * FROM tabe" + wherequery;
sql = connection.CreateCommand();
sql.CommandText = query;
sql.Parameters.Add(sqlparams);
Hi,
I ran into this problem and could not solve it, so I have a swf file that loads assets from
another swf file, everything's fine, until I put them on the server, they are under the same
domain, relative path doesnt work nor does absolute path. This is not even a cross domain
problem, since both files are on the same server.
Did anyone ever have the same problem?
Thanks.
I am using Doxygen to generate some API docs for a C# project I am working on. I have quite a bit of "internal" functionality in this project and don't want Doxygen producing these signatures in the generated html it produces.
I have tried enabling HIDE_FRIEND_COMPOUNDS but this still results in my internal classes being exposed in the generated documentation.
Does anyone know howto do this?
I am writing an app to do a file conversion and part of that is replacing old account numbers with a new account numbers.
Right now I have a CSV file mapping the old and new account numbers with around 30K records. I read this in and store it as dict and when writing the new file grab the new account from the dict by key.
My question is what is the best way to do this if the CSV file increases to 100K+ records?
Would it be more efficient to convert the account mappings from a CSV to a sqlite database rather than storing them as a dict in memory?
I am trying to develop a strategy game and i am thinking of creating the following game maps similar to below.
How do i go about doing it and what kind of software to use of books/ tutorials to follow?
Thanks
I have an interesting problem/question and i'm not sure if it is even doable. So I have a custom header view for regular UITableView. But it's transparent and it doesn't fill fill table width. So it displayed properly when table is scrolled and this header view is displayed above cell content (sticked to the top). But when same header is displayed between two sections down - it looks ugly, because it's transparent and it's either displayed above black rectangle or above table background.
I was wondering is there way to customize header view for when it's stick to the top and when it's not. Or... may be it's possible to specify what needs to be displayed underneath header view when it's between sections. Something like sectionSeparatorView?
I need to ask if any of you has any knowledge of creating file thumbnails on the fly. I have found a free component but it works only for PDF files, PDFThumbnailer.
But my requirement is to convert DOC/RTF/PDF/XLS files to thumbnails on the fly, and if possible allow to save it as an image for later reference which currently PDFThumbnailer doesnt allow. PDFThumbnailer takes the pdf file and renders an image for it on browser, if that image can also be saved somehow to my machine that would be great too.
Please guide me of howto achieve the above requirements. Any help for any filetype is appreciated.
Thanks
Imdadhusen