Search Results

Search found 7629 results on 306 pages for 'tum bin'.

Page 160/306 | < Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >

  • Visual Studio 2008 - Assemblies are not loaded into Modules after relocating the website and project

    - by user296861
    I recently moved the asp.net website solution folder (along with class projects) to different location. As the result, visual studio doesn't stop at break points, and I could not able to debug. I see none of my assemblies at Debug Windows Modules; only microsoft assemblies are loaded. I have also deleted all bin folder and re-referenced all projects. But still no luck. Thanks in advance!

    Read the article

  • Why can't my function access a variable in an enclosing function?

    - by nailer
    I know about the LEGB rule. But a simple test of whether a function has read access to variables defined in an enclosing function doesn't seem to actually work. Ie: #!/usr/bin/env python2.4 '''Simple test of Python scoping rules''' def myfunction(): print 'Hope this works: '+myvariable def enclosing(): myvariable = 'ooh this worked' myfunction() if __name__ == '__main__': enclosing() Returns: NameError: global name 'myvariable' is not defined Am I doing something wrong? Is there more to it than the LEGB resolution order?

    Read the article

  • System loops using non-integers?

    - by mary
    I wrote a .sh file to compile and run a few programs for a homework assignment. I have a "for" loop in the script, but it won't work unless I use only integers: #!/bin/bash for (( i=10; i<=100000; i+=100)) do ./hw3_2_2 $i done The variable $i is an input for the program hw3_2_2, and I have non-integer values I'd like to use. How could I loop through running the code with a list of decimal numbers?

    Read the article

  • Ruby: execute a binary file in memory?

    - by John
    Is it possible to read binary in ruby file and execute it directly in memory? for example something like this: x = IO.read('/bin/ls') execute(x) I tried system(x) but it doesn't work ArgumentError: string contains null byte

    Read the article

  • Why dll can't be used in c++?

    - by Mask
    It's pointed out by this answer: http://stackoverflow.com/questions/2532280/failed-to-link-mysql5-1-39-bin-libmysql-dll-in-a-c-project/2532382#2532382 But I don't understand why,.dll is essentially the same as .lib except for there is only one copy of it used by different processes. Does it have anything to do with the IDE?I'm using visual c++ 2008 express

    Read the article

  • FLEX: how to correctly pass the link to a page ?

    - by Patrick
    hi, I'm using <mx:LinkButton click="navigateToURL(new URLRequest(event.currentTarget.label.toString()))" /> to open a browser window to display the website on the label of my LinkButton. However I cannot correctly pass the link.. you see the problem: file://localhost/..myapp/bin-debug/www.google.com thanks

    Read the article

  • Cannot debug in visual studio 2008

    - by Chin
    I recently reopened a project and on trying to debug the breakpoint only shows as a red circle and gives the following message "The breakpoint will not currently be hit. No symbols have been loaded for this document" I notice there are no PB files in the bin directory. I presume I need to rebuild the debug files. Does anybody know how to go about this? Any help much appreciated.

    Read the article

  • Expire models in Rails

    - by Koning Baard XIV
    I'm creating a simple paste-bin in Ruby on Rails, which will have an expire-feature. With this, people can select a date when the paste will be deleted automatically. How can I implement this? I was thinking of a cronjob, but maybe there is a more platform-independent way, by defining this in the model itself. Can anyone help me? Thanks.

    Read the article

  • execl doesn't work in a while(1) cicle, server side; C script

    - by Possa
    Hi guys, I have a problem with a little C script who should run as a server and launch a popup for every message arriving. The execl syntax is correct because if I try a little script with main() { execl(...); } it works. When I put it in a while(1) cicle it doesn't work. Everything else is working, like printf or string operation, but not the execl. Even if I fork it doesn't work. I really don't know what I can do ... can anyone help me? Thanks in advice for your help and sorry for my bad english. Here's the complete server C code. #include <arpa/inet.h> #include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include <string.h> #define BUFLEN 512 #define PORT 9930 void diep(char *s) { perror(s); exit(1); } int main() { struct sockaddr_in si_me, si_other; int s, i, slen=sizeof(si_other), broadcastPermission; char buf[100], zeni[BUFLEN]; if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1) diep("socket"); broadcastPermission = 1; if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (void *) &broadcastPermission, sizeof(broadcastPermission)) < 0) diep("setsockopt() failed"); memset((char *) &si_me, 0, sizeof(si_me)); si_me.sin_family = AF_INET; si_me.sin_port = htons(PORT); si_me.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(s, &si_me, sizeof(si_me))==-1) diep("bind"); while (1) { if (recvfrom(s, buf, BUFLEN, 0, &si_other, &slen)==-1) diep("recvfrom()"); //printf("Received packet from %s:%d\nData: %s\n", inet_ntoa(si_other.sin_addr), ntohs(si_other.sin_port), buf); strcpy(zeni, ""); strcat(zeni, "zenity --warning --title Hack!! --text "); strcat(zeni, buf); printf("cmd: %s\n", zeni); //system (zeni); execl("/usr/bin/zenity", "/usr/bin/zenity", "--warning", "--title", "Warn!", "--text", buf, (char *) NULL); } close(s); return 0; }

    Read the article

  • Switching 2003 SRV to 2008 caused Asp.net application not to load DLL

    - by Tom
    Switching aged 2003 SRV to 2008 caused my Asp.net 2 application fail: The application is no more loading the required library DLL from /bin/ folder anymore. What should I change in my code or web.config to make this webapp load OK also in new 2008 server? Now I receive this error when I access the application: This type is in IMPORTS ( Dll ). Compiler Error Message: BC30002: Type 'Facebook.Entity.User' is not defined.

    Read the article

  • I need to cut a portion of a string in linux

    - by Abeed Salam
    I have a file in a folder like this: installer-x86_64-XXX.XX-diagnostic.run The XXX.XX is a version number and I need the version number only. How to do it in linux? I have this code: #!/bin/bash current_ver=$(find /mnt/builds/current -name '*.run'|awk -F/ '{print $NF}') So this gives me just the name of the file correctly (minus the location, which I dont want). But how do I only get the XXX.XX version number into a variable such as $version

    Read the article

  • glassfish v3 asadmin how to specify XA on connection factory

    - by NDK
    This worked in GFV2: $AS_HOME/bin/asadmin \ --host $AS_ADMIN_HOST \ --user $AS_ADMIN_USER \ --port $AS_ADMIN_PORT \ create-jms-resource \ --restype javax.jms.QueueConnectionFactory \ --description XA\ Queue\ Connection\ Factory \ --property Name=myXAQueueConnectionFactory:SupportsXA=true \ jms/myXAQueueConnectionFactory But the SupportsXA=true no longer works. Maybe I can't find it in the GFV3 manuals, nor can I find it via our friend Google: how to specify XA transactionality using asadmin to configure the factory? Anybody out there know how?

    Read the article

  • Trying to provide a global logging function

    - by Gekitsuu
    I typically write my scripts with a structure like s #!/usr/bin/python import stuff def do_things(): print "FOO" def main(): do_things() if __name__ == "__main__": main() The problem I have is I'd like to have a logging function that is defined globally and I"m not really sure how to do this. I tried a decorator function but if I define it in main I can't call it from other functions in the script. It seems like something that should be easy to do but not something I have experience with.

    Read the article

  • Script Bash and History Unix

    - by user1107078
    i just start to use Script bash on UNIX and i didnt find a solution to write the first command in the history which start , for example , with ls. If i write in the shell history !ls it works but when i'm going to create a script it wont work. This is my example code #!/bin/bash set -o | grep history set -o history #echo "HISTFILE is $HISTFILE" #history "!ls"; #history #!ls history #it works Another Question why echo "HISTFILE is $HISTFILE" print me only HISTFILE is ?? Thanks

    Read the article

  • plotting stem with a continuous line

    - by Abruzzo Forte e Gentile
    Hi All I need to plot a stem plot of my signal using python and matplotlib. I saw the example and the code but the line connecting the black big dot and the x-axis is not a continous line. Do you know whether is possible and how to get a straight line instead? Thank you very much AFG #!/usr/bin/env python from pylab import * x = linspace(0.1, 2*pi, 10) markerline, stemlines, baseline = stem(x, cos(x), '-.') setp(markerline, 'markerfacecolor', 'b') setp(baseline, 'color','r', 'linewidth', 2) show()

    Read the article

  • Using pydev with Eclipse on OSX

    - by Sunit
    I setup PyDev with this path for the python interpreter /System/Library/Frameworks/Python.framework/Versions/2.5/Python since the one under /usr/bin were alias and Eclipse won't select it. I can run my python script now but cannot run the shell as an external tool. The message I get is variable references empty selection ${resource_loc} Same if I use {container_loc} Any thoughts ? Sunit

    Read the article

  • What is the best way to include other scripts?

    - by Aaron H.
    The way you would normally include a script in bash is source. For example: main #!/bin/bash source incl.bash echo "The main script" incl.bash echo "The included script" The output of executing ./main: The included script The main script Now, if you attempt to execute that shell script from another location, it can't find the include unless it's in your PATH. What's a good way to ensure that your script can find the included script, especially if for instance, the script needs to be portable?

    Read the article

  • How to store the hostname in a variable in a .bat file?

    - by eqbridges
    I would like to convert this /bin/sh syntax into a widely compatible Windows batch script: host=`hostname` echo ${host} How to do this so that it'll work on any Windows Vista, Windows XP, and Windows 2000 machine? To clarify: I would then like to go on in the program and use the hostname as stored in the variable host. In other words, the larger goal of the program is not to simply echo the hostname.

    Read the article

  • I would like to run my Java program on System Startup on Mac OS/Windows. How can I do this?

    - by Misha Koshelev
    Here is what I came up with. It works but I was wondering if there is something more elegant. Thank you! Misha package com.mksoft.fbbday; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.io.File; import java.io.FileWriter; import java.io.PrintWriter; public class RunOnStartup { public static void install(String className,boolean doInstall) throws IOException,URISyntaxException { String osName=System.getProperty("os.name"); String fileSeparator=System.getProperty("file.separator"); String javaHome=System.getProperty("java.home"); String userHome=System.getProperty("user.home"); File jarFile=new File(RunOnStartup.class.getProtectionDomain().getCodeSource().getLocation().toURI()); if (osName.startsWith("Windows")) { Process process=Runtime.getRuntime().exec("reg query \"HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\" /v Startup"); BufferedReader in=new BufferedReader(new InputStreamReader(process.getInputStream())); String result="",line; while ((line=in.readLine())!=null) { result+=line; } in.close(); result=result.replaceAll(".*REG_SZ[ ]*",""); File startupFile=new File(result+fileSeparator+jarFile.getName().replaceFirst(".jar",".bat")); if (doInstall) { PrintWriter out=new PrintWriter(new FileWriter(startupFile)); out.println("@echo off"); out.println("start /min \"\" \""+javaHome+fileSeparator+"bin"+fileSeparator+"java.exe -cp "+jarFile+" "+className+"\""); out.close(); } else { if (startupFile.exists()) { startupFile.delete(); } } } else if (osName.startsWith("Mac OS")) { File startupFile=new File(userHome+"/Library/LaunchAgents/com.mksoft."+jarFile.getName().replaceFirst(".jar",".plist")); if (doInstall) { PrintWriter out=new PrintWriter(new FileWriter(startupFile)); out.println(""); out.println(""); out.println(""); out.println(""); out.println(" Label"); out.println(" com.mksoft."+jarFile.getName().replaceFirst(".jar","")+""); out.println(" ProgramArguments"); out.println(" "); out.println(" "+javaHome+fileSeparator+"bin"+fileSeparator+"java"); out.println(" -cp"); out.println(" "+jarFile+""); out.println(" "+className+""); out.println(" "); out.println(" RunAtLoad"); out.println(" "); out.println(""); out.println(""); out.close(); } else { if (startupFile.exists()) { startupFile.delete(); } } } } }

    Read the article

  • Why PHP Error: Call to a member function set_prefix() on a non-object

    - by Rebol Tutorial
    I got this error Fatal error: Call to a member function set_prefix() on a non-object in /home/reboltutorial/reboltutorial.com/wp-settings.php on line 254 line 254 contains: $prefix = $wpdb->set_prefix($table_prefix); // set up global tables This occurs if I try to call index_wordpress() instead of calling these two lines define('WP_USE_THEMES', true); require('./wp-blog-header.php'); so this doesn't work: <?php function index_wordpress() { define('WP_USE_THEMES', true); require('./wp-blog-header.php'); } ?> <?php if(!function_exists('apache_request_headers')) { function apache_request_headers() { $headers = array(); foreach($_SERVER as $key => $value) { if(substr($key, 0, 5) == 'HTTP_') { $headers[str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))))] = $value; } } return $headers; } } function getCurrentPageUrl() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } $a = apache_request_headers(); $pos = strrpos($a["User-Agent"], "REBOL"); if ($pos === false) { index_wordpress(); } else { if ($_SERVER['REMOTE_ADDR'] != "69.163.203.14") { $command= './cgi-bin/index.cgi '. '"' . getCurrentPageUrl() . '"'; echo system($command); } else { index_wordpress(); } } ?> while this works: <?php if(!function_exists('apache_request_headers')) { function apache_request_headers() { $headers = array(); foreach($_SERVER as $key => $value) { if(substr($key, 0, 5) == 'HTTP_') { $headers[str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))))] = $value; } } return $headers; } } function getCurrentPageUrl() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } $a = apache_request_headers(); $pos = strrpos($a["User-Agent"], "REBOL"); if ($pos === false) { define('WP_USE_THEMES', true); require('./wp-blog-header.php'); } else { if ($_SERVER['REMOTE_ADDR'] != "69.163.203.14") { $command= './cgi-bin/index.cgi '. '"' . getCurrentPageUrl() . '"'; echo system($command); } else { define('WP_USE_THEMES', true); require('./wp-blog-header.php'); } } ?>

    Read the article

  • R: How to write out a data.frame so that I can paste it into SO for others to read?

    - by John
    I have a large data.frame displaying some weird properties when plotted. I'd like to ask a question about it on Stackoverflow, to do that I'd like to write the data.frame out in a form that I can paste it into SO and somebody else can easily run it and have it back into a data.frame object again. Is there an easy way to accomplish this? Also, if it is really long, should I use paste bin instead of directly paste it here?

    Read the article

  • Not able to connect the DB from Servlet

    - by user1885127
    I have started jsp servlet application with Xampp Server, In which I have dbconnection.java and LoginValidator.java (servlet) files. I'm getting an error while trying to access the database from servlet (LoginValidator.java). It is getting the following error: Class Not found Exception : com.mysql.jdbc.Driver I have imported the mysql-connector-java-5.1.18-bin.jar. I have searched a lot but could not find the solution.

    Read the article

< Previous Page | 156 157 158 159 160 161 162 163 164 165 166 167  | Next Page >