Search Results

Search found 3567 results on 143 pages for 'instructions'.

Page 89/143 | < Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >

  • I asked this yesterday, after the input given I'm still having trouble implementing..

    - by Josh
    I'm not sure how to fix this or what I did wrong, but whenever I enter in a value it just closes out the run prompt. So, seems I do have a problem somewhere in my coding. Whenever I run the program and input a variable, it always returns the same answer.."The content at location 76 is 0." On that note, someone told me that "I don't know, but I suspect that Program A incorrectly has a fixed address being branched to on instructions 10 and 11." - mctylr but I'm not sure how to fix that.. I'm trying to figure out how to incorporate this idea from R Samuel Klatchko.. I'm still not sure what I'm missing but I can't get it to work.. const int OP_LOAD = 3; const int OP_STORE = 4; const int OP_ADD = 5; ... const int OP_LOCATION_MULTIPLIER = 100; mem[0] = OP_LOAD * OP_LOCATION_MULTIPLIER + ...; mem[1] = OP_ADD * OP_LOCATION_MULTIPLIER + ...; operand = memory[ j ] % OP_LOCATION_MULTIPLIER; operation = memory[ j ] / OP_LOCATION_MULTIPLIER; I'm new to programming, I'm not the best, so I'm going for simplicity. Also this is an SML program. Anyway, this IS a homework assignment and I'm wanting a good grade on this. So I was looking for input and making sure this program will do what I'm hoping they are looking for. Anyway, here are the instructions: Write SML (Simpletron Machine language) programs to accomplish each of the following task: A) Use a sentinel-controlled loop to read positive number s and compute and print their sum. Terminate input when a neg number is entered. B) Use a counter-controlled loop to read seven numbers, some positive and some negative, and compute + print the avg. C) Read a series of numbers, and determine and print the largest number. The first number read indicates how many numbers should be processed. Without further a due, here is my program. All together. int main() { const int READ = 10; const int WRITE = 11; const int LOAD = 20; const int STORE = 21; const int ADD = 30; const int SUBTRACT = 31; const int DIVIDE = 32; const int MULTIPLY = 33; const int BRANCH = 40; const int BRANCHNEG = 41; const int BRANCHZERO = 41; const int HALT = 43; int mem[100] = {0}; //Making it 100, since simpletron contains a 100 word mem. int operation; //taking the rest of these variables straight out of the book seeing as how they were italisized. int operand; int accum = 0; // the special register is starting at 0 int j; // This is for part a, it will take in positive variables in a sent-controlled loop and compute + print their sum. Variables from example in text. memory [0] = 1010; memory [01] = 2009; memory [02] = 3008; memory [03] = 2109; memory [04] = 1109; memory [05] = 4300; memory [06] = 1009; j = 0; //Makes the variable j start at 0. while ( true ) { operand = memory[ j ]%100; // Finds the op codes from the limit on the memory (100) operation = memory[ j ]/100; //using a switch loop to set up the loops for the cases switch ( operation ){ case 10: //reads a variable into a word from loc. Enter in -1 to exit cout <<"\n Input a positive variable: "; cin >> memory[ operand ]; break; case 11: // takes a word from location cout << "\n\nThe content at location " << operand << "is " << memory[operand]; break; case 20:// loads accum = memory[ operand ]; break; case 21: //stores memory[ operand ] = accum; break; case 30: //adds accum += mem[operand]; break; case 31: // subtracts accum-= memory[ operand ]; break; case 32: //divides accum /=(memory[ operand ]); break; case 33: // multiplies accum*= memory [ operand ]; break; case 40: // Branches to location j = -1; break; case 41: //branches if acc. is < 0 if (accum < 0) j = 5; break; case 42: //branches if acc = 0 if (accum == 0) j = 5; break; case 43: // Program ends exit(0); break; } j++; } return 0; }

    Read the article

  • Tortoise SVN does not give option to "Add to SVN"

    - by Clay Nichols
    I've created an SVN repository and added folders and added contents and Committed. No problem. But when go to add a new folder (the others were on the P:\ drive, now I want to add our website which is on the C:\ drive) but Tortoise doesn't give me the option of Adding a folder. I have no idea why. Help file shows the instructions I'd expect ("right click on the folder you want to add and choose +Add...") but Add... isn't in the menu. This is TortoiseSVN v 1.6.7.18415 (I'm about to update it but I was able to add folders before so I don't think this is just a bug, I think maybe I'm missing something obvious).

    Read the article

  • Installing CakePHP on Windows with Apache

    - by GeoSQL
    Hi, I'm trying to install CakePHP on my Windows XP machine running Apache 2.2. I have installed the Cake folder in my doc root. I've read the installation instructions that say to include this line in the httpd.conf file; <Directory /path/to/cake> Does anyone know how to translate that into Windows? I currently have the following in my conf file: <Directory "C:/Apache/Apache2.2/htdocs/cakeapp/"> Whenever I uncomment this line it crashes Apache. I've tried switching the slashes to "\" and I tried taking the slash off the end. Any advice? Thanks

    Read the article

  • SFML 2.0 crashes anytime a method is called

    - by Ken
    This code generates an exception: #include <SFML/Graphics.hpp> #include <SFML/Window.hpp> #include <SFML/System.hpp> int main() { sf::Clock clock; clock.getElapsedTime(); return 0; } However, this doesn't crash: #include <SFML/Graphics.hpp> #include <SFML/Window.hpp> #include <SFML/System.hpp> int main() { sf::Clock clock; return 0; } I'm using SFML 2.0, Windows 7, MinGW 4.70 (Code::Blocks). I don't know why, I followed all instructions to link the libraries and nothing seems to be working. I might be missing something simple through my anger (I've been trying to run sample code for a week, nothing has been working), so can anybody throw me a bone?

    Read the article

  • How to query data from a password protected https website using C# .NET

    - by Addie
    I'd like my application to query a csv file from a secure website. I have no experience with web programming so I'd appreciate detailed instructions. Currently I have the user login to the site, manually query the csv, and have my application load the file locally. I'd like to automate this by having the user enter his login information, authenticating him on the website, and querying the data. The application is written in C# .NET. The url of the site is: https://www2.emidas.com/default.asp. I've tested the following code already and am able to access the file once the user has already authenticated himself and created a manual query. System.Net.WebClient Client = new WebClient(); Stream strm = Client.OpenRead("https://www3.emidas.com/users/<username>/file.csv");

    Read the article

  • How to download Google Cloud Messaging (GCM) from Google Code?

    - by Dennis
    I'm trying to learn how to use GCM and I want download the simple app. I'm following the instructions here: http://developer.android.com/google/gcm/server.html. Using App Engine for Java To set up the server using a standard App Engine for Java: Get the files from the open source site, as described above. I entered the link - https://code.google.com/p/gcm/ but there is no download there, and I don't have Git (and I don't know how to use it..). Can someone please explain how to download it or give me a link or something? Thank you in advance!

    Read the article

  • Need help creating flash animation with clickable buttons at the end.

    - by goldenfeelings
    Very inexperienced with Flash, but I hope this is simple enough for someone to walk me through. I'm ultimately trying to create a flash page for an html website that has a brief five-second animation during which 3 buttons fade in (buttons then become clickable after the animation is over). The animation part is done. Right now, I am trying to get my movie to stop and hold on the last frame, where I want to add the 3 buttons that the user can click on to take them to one 3 different html pages of my website. All instructions that I've found online have said to create a new layer for actions, insert a keyframe on the last frame of the movie, and add stop(); in the actionscript window. However, when I have the keyframe selected, my actionscript window says "current selection cannot have actions applied to it". Any ideas? I definitely don't have any objects selected, just the keyframe. Or, am I approaching this totally wrong?

    Read the article

  • Weird problem, with ghostscript and pdf files.

    - by kofucii
    Hello, am using ghostscript to create pdf file from postscript file. My PS file, doesn't have orientation instructions, so when I want to create landscape pdf file, I'm using ghostscript to rotate the page. The problem is, that ghostscript rotates only the first page, and when my pdf file is more than 1 page, the others, are not rotated correctly. Here is the command I'm using: cat $psinput | gs -sPAPERSIZE=a4 -sDEVICE=pdfwrite -sOuputFile="/tmp/pdf" \ -dAutoRotatePages="/None" -c "<< /Orientation 3 >> setpagedevice" \ 90 rotate 0 -595 translate -dNOPAUSE -dEPSCrop -f - -c -quit Does anybody have an idea how to correct this?

    Read the article

  • C++ cast syntax styles

    - by palm3D
    A question related to Regular cast vs. static_cast vs. dynamic_cast: What cast syntax style do you prefer in C++? C-style cast syntax: (int)foo C++-style cast syntax: static_cast<int>(foo) constructor syntax: int(foo) They may not translate to exactly the same instructions (do they?) but their effect should be the same (right?). If you're just casting between the built-in numeric types, I find C++-style cast syntax too verbose. As a former Java coder I tend to use C-style cast syntax instead, but my local C++ guru insists on using constructor syntax. What do you think?

    Read the article

  • Is there a technical way to speed up a general program above current PC speed limit?

    - by Maksee
    Let's imagine I developed a Windows console application implementing some algorithm calculating something. Let's say it doesn't use any threads, just straightforward linear approach with ifs, loops and so on. Is there any technical way to make if run it 100x times faster than on the most advanced current PC? For example one of the way would be to run it on a super computer that emulates i386 faster than any of the existing PCs. But in this case the question what computer and does it really have ability to emulate Windows. In other words, is there real examples of such approach? Although in general it looks useless, but if there is a way, one could develop some program on his general home computer and pay for running it much faster on some other hardware. I suppose that this question could be asked on superuser.com, but since there are possible specific with such things as assembler instructions or threads, I thought that stackoverflow.com is better

    Read the article

  • workflow assign task to multiple users

    - by Artru
    I have MOSS. I want to make a page where a user, say administrator, could send some instructions to a server, for example using standard library and make task for a group of users forcing them to read files. After the reading users would press "already read it" and administrator would know who did it/who did not. I created simple workflow in office designer and choose assigne task to Group1, which is in the sharepoint server. After WF run everyone who is in Group1 get message about a task, that's great. However this task is general for group and if we go to the site section "current tasks", we can see it, while I want this task for every person in Group1. Futher question, is it possible to create form where administrator will choose users for this task, 'cause now I munualy set group in WF.

    Read the article

  • Serving GZipped files from s3 using the Asset Pipeline

    - by kmurph79
    I have a Rails 3.2.3 app on Heroku and I'm using the asset_sync gem to serve my assets from s3, via these instructions. It works great, except s3 is not serving up the gzipped css/js files (just the uncompressed version). I've enabled gzip compression, to no avail: config.gzip_compression = true According to Using GZIP with html pages served from Amazon S3 I need to add meta-data to the s3 object for uploading. How would I do this in concert with the Asset Pipeline? Thank you for any help.

    Read the article

  • How to update control state in asp.net/ajax?

    - by darth_alexious
    I'm trying to update certain controls according to a selection in a dropdown list. For example, in the "selectedIndexChanged" event of a dropDownList, if a user selects the value "sport-car" the text box "payload" is disabled and the textbox "max speed" is enabled. private sub dropDownList1_SelectedIndexChanged(byval sender as object, byval e as eventargs) handles dropDownList1.SelectedIndexChanged If dropDownList1.selectedValue = "sport-car" then textBox_payLoad.enabled = false textBox_maxSpeed.enabled = true end if end sub When I'm doing something like this, the controls aren't enabled/disabled, even the event (wich I've added a breakpoint) seems not to be raised (sometimes several time after it is raised). Also, when the instructions in the condition is executed, nothing changes. What am I doing wrong? Maybe this is a very easy issue, but I'm a begginer in MS Visual Web Developer.

    Read the article

  • Rails - Cant get http_accept_language gem to work in my rails project

    - by adam
    I'm internationalizing my app and I've installed the http_accept_language gem on my system I've placed config.gem 'http_accept_language' into my environment.rb file but every time I try to run this code in my controller request.user_preferred_languages it complains of no method error. There are no other instructions on the readme on github... am I missing something? EDIT - Problem solved. after a good nights sleep I came back and realised I hadnt restarted the server. I hate it when that happens.

    Read the article

  • How to make GhostScript PS2PDF stop subsetting fonts

    - by gavin-softyolk
    I am using the ps2pdf14 utility that ships with GhostScript, and I am having a problem with fonts. It does not seem to matter what instructions I pass to the command, it insists on subsetting any fonts it finds in the source document. e.g -dPDFSETTINGS#/prepress -dEmbedAllFonts#true -dSubsetFonts#false -dMaxSubsetPct#0 Note that the # is because the command is running on windows, it is the same as =. If anyone has any idea how to tell ps2pdf not to subset fonts, I would be very greatful. Thanks --------------------------Notes ------------------------------------------ The source file is a pdf containing embedded fonts, so it is the fonts already embedded in the source file, that I need to prevent being subset in the destination file. Currently all source file embedded fonts are subset, in some cases this is not apparent from the font name, i.e it contains no hash, and appears at first glance to be the full font, however the widths array has been subset in all cases.

    Read the article

  • Django 404 pages not appearing?

    - by AP257
    I want to add a 404 page on my Django site. I've created a template, 404.html, and saved it in the root of my /templates directory. I've also made sure that the from django.conf.urls.defaults import * line is included at the top of urls.py. I've set DEBUG to False. (I've been following these instructions.) However, if I try to go to a page that I know doesn't exist - whether a made-up URL or a view specifically designed to do get_object_or_404 - the 404 page doesn't appear: I just get Chrome's standard 'Oops! This link appears to be broken' page. Oddly, I also have a 500.html template in the same place and that is appearing just fine if I generate a 500 error. What might the problem be?

    Read the article

  • Android Development - Conversion to Dalvik format failed with error 1

    - by KP65
    So I'm dipping my toes into this area for the first time - i followed instructions to install the android SDK and eclipse plug in. I created a blank new android project and I get the following build errors: [2011-01-08 16:34:55 - xxx]: Dxno classfiles specified [2011-01-08 16:34:55 - xxx] Conversion to Dalvik format failed with error 1 I've googled the problem and tried to clean and rebuild, or hitting F5 on the project in the explorer but the issue remains. I've verified the build paths and the libraries to make sure only Android 2.3 is there but still get this issue. I have also tried to load a sample project and I get the same error. Any ideas?

    Read the article

  • import existing source code as referenced library in eclipse

    - by user555174
    I have some source codes from a friend that I would like to use as referenced library in my BlackBerry project. I'm not sure about how to package the source codes into a .jar file. I tried exporting the source to a JAR file and import it as external JAR in my project, it's giving me missing stack map error. I tried to preverify the .jar file generated from the source using the provided preverification tool from BlackBerry JDE, it didn't give me any output folder. In fact, I'm not sure if the way I export the source is correct. Can anyone provide step-by-step instructions on how to package existing source code into a valid JAR file that can be imported into my project as a referenced library? Again, I'm using eclipse. Thanks very much in advance.

    Read the article

  • Jquery autocomplete for input form, using Textpattern category list as a source

    - by John Stephens
    I'm using the Textpattern CMS to build a discussion site-- I have a firm grasp of XHTML and CSS, as well as Textpattern's template language, but PHP and Javascript are a bit beyond my cunning. On the input form to begin a new topic, users need to select a category from a list of over 5,000 options. Using the HTML select-type input element is very unwieldy, but it works. I would like to use some kind of Javascript magic to display a text-type input element that will read user input and display matches or autocomplete from the available categories, passing the required option's value into the appropriate database field. I've seen several autocomplete plugins for jquery, but the instructions presuppose that you understand how Javascript works. As I mentioned above, it's easy for me to generate the category list as a select-type input element, and I can hide that element using CSS. Is it possible to control select-list input using an autocomplete mechanism in a text-type input element? How would I do that?

    Read the article

  • Requested URL is changing

    - by user302486
    Hi, I have a website, at localhost:82 when I type this into IE, it comes up with a 404 error and the requested URL is localhost:80/wwwroot, which is not at all what I requested. There is no URL rewrite set up. I have tried to set up a tracing rule to see what is happening, however, the instructions at http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis-7/ say to look for "Fail Request Tracing" link, but it doesn't exist in my IIS 7.0 even under administrator. Not sure where to look or why this is changing my requested URL. Any help would be appreciated.

    Read the article

  • Activity should be transparent, but has black background

    - by Uwe Krass
    I followed the instructions of writing a transparent layout. My res/values/style.xml looks like this: <resources> <style name="Theme" parent="android:Theme" /> <style name="Theme.Transparent"> <item name="android:windowBackground">@drawable/transparent_background</item> </style> <drawable name="transparent_background">#00000000</drawable> </resources> The activity snippet looks like this: <activity android:name=".Controlls" android:label="Controlls" android:theme="@style/Theme.Transparent"> When I start this activity from my root activity, the layout gets drawn correctly, but the background stays black.

    Read the article

  • how to set BUILD_MAC_SDK_EXPERIMENTAL=1 on Mac 10.7?

    - by Nguyen Minh Binh
    I am building Android OS source on Mac 10.7 follow instructions at: http://source.android.com/source/building.html. Below are the error code when I try to run lunch full-eng BinhNguyens-MacBook:WORKING_DIRECTORY CuongLy$ lunch full-eng 2012-10-04 14:02:58.544 xcodebuild[645:80b] XcodeColors: load (v10.1) 2012-10-04 14:02:58.560 xcodebuild[645:80b] XcodeColors: pluginDidLoad: build/core/combo/HOST_darwin-x86.mk:62: ***************************** build/core/combo/HOST_darwin-x86.mk:63: * Can not find SDK 10.6 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk build/core/combo/HOST_darwin-x86.mk:65: * If you wish to build using higher version of SDK, build/core/combo/HOST_darwin-x86.mk:66: * try setting BUILD_MAC_SDK_EXPERIMENTAL=1 before build/core/combo/HOST_darwin-x86.mk:67: * rerunning this command build/core/combo/HOST_darwin-x86.mk:69: ***************************** build/core/combo/HOST_darwin-x86.mk:70: * Stop.. Stop. Please tell me how to set BUILD_MAC_SDK_EXPERIMENTAL=1 ?

    Read the article

  • Shift browser contents to the left while viewing in wide screen

    - by Sathya
    I use a widescreen laptop. Many websites have their content centre aligned. On wider screens this means lot of empty space on left and right. As such this is not a botheration. Many a times, I read some instructions on the web page and type them out on the command prompt. I prefer to overlay the command prompt window on top of the browser and if the browser contents are left aligned (or right aligned), then I need not Alt-tab across these windows. I use Firefox on Ubuntu. I use the command line (konsole) heavily. I know compiz (and similar) tools provides transparent windows so that the content beneath is visible. But I don't want to install compiz or its equivalent because my graphics driver is not all that good. Any addon or simple trick that would shift the page content to the left (or right) would be very helpful (read productive).

    Read the article

  • Linker Error: iPhone Unit Test Bundle referencing App classes

    - by ohhorob
    Starting with an app already in development, I have carried out the instructions in the iPhone Development Guide – Unit Testing Applications I can successfully include and use my App's classes in Application-style tests that run on the device, and output their results to the console. If I add the following line of code: STAssertTrue([viewController isKindOfClass:[LoginViewController class]], @"Top view controller is not LoginViewController"); The following build error is generated: Undefined symbols: "_OBJC_CLASS_$_LoginViewController", referenced from: __objc_classrefs__DATA@0 in LoginViewTest.o ld: symbol(s) not found collect2: ld returned 1 exit status I can provide more configuration information for the project and the Testing target, but the setup works file without the [LoginViewController class] line in the test source. Without that line, I can reference the class, use it's properties and send it messages successfully. Is there a linking build setting, or bundle loading option that is required when attempting to use an App class in this fashion? Or should I find another type of test to confirm that the class of an object is the expected one?

    Read the article

  • Need to know who is hogging my bandwidth?

    - by Dev
    I have an ethernet connection to my iMac and with Internet sharing I am broadcasting the wireless network from my mac rather than using a wireless router. I use it to connect other devices wirelessly to the internet. But this makes all the traffic flow through my iMac. I wanted a way to analyze the traffic so that I know what connected devices are hogging the bandwidth at a given time and from which websites? I installed wireshark for mac and played around a little but it seems like an overkill when you first look at it. Can someone please help with few instructions to get what I need or any other way other than using wireshark? Thanks Dev.

    Read the article

< Previous Page | 85 86 87 88 89 90 91 92 93 94 95 96  | Next Page >