Search Results

Search found 91526 results on 3662 pages for 'clean code'.

Page 110/3662 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • HP Pavilion tx2000 - Wifi adapter no longer works after moving from 12.04 to a 12.10 clean install

    - by Marek L.
    I have a HP Pavilion tx2000 that I have been running Ubuntu 12.04 on for a couple of months without any problems (wifi worked great) until yesterday when my hard drive failed. I replaced the hard drive and decided to install Ubuntu 12.10. Unlike 12.04, the wifi did not work after the installation finished and all the updates where installed (over Ethernet). The network drop down in the top right didn't even show a wireless option. I Googled about for a bit and found some solutions that seemed like they might work. Unfortunately they did not. Here is what I tried: sudo apt-get remove bcmwl-kernel-source sudo apt-get install b43-fwcutter sudo apt-get install firmware-b43-lpphy-installer Restart the computer. And the wifi still didn't work. At which point I panicked a bit and tried to undo the previous commands by running: sudo apt-get remove b43-fwcutter firmware-b43-lpphy-installer sudo apt-get install bcmwl-kernel-source Restart the computer. The wifi still doesn't work. This is where I stopped because I have no idea what I am doing and don't want to mess something up. The network drop down still doesn't show a wireless option and the hardware wifi switch on the laptop is amber (it turns blue when the wifi is on). Using the hardware switch does not change the color. Output from: sudo lspci ... 08:00.0 Network controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01) ... Output from: sudo lshw -class network *-network UNCLAIMED description: Network controller product: BCM4322 802.11a/b/g/n Wireless LAN Controller vendor: Broadcom Corporation physical id: 0 bus info: pci@0000:08:00.0 version: 01 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list configuration: latency=0 resources: memory:d1100000-d1103fff ... Output from: sudo rfkill list all 0: hp-wifi: Wireless LAN Soft blocked: no Hard blocked: yes UPDATE: After writing up this question tried the following command: sudo rfkill unblock all At first it didn't do anything but after running it about four times, sudo rfkill list all now returns: 0: hp-wifi: Wireless LAN Soft blocked: no Hard blocked: no But the network menu still does not have a wireless option and the hardware switch still glows amber. Pushing the hardware switch turns the hard block back on and I have to run sudo rfkill unblock all multiple times again to turn it off. Any help is appreciated! Update 2: Full output from sudo lspci -nn: 00:00.0 Host bridge [0600]: Advanced Micro Devices [AMD] RS780 Host Bridge [1022:9600] 00:01.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (int gfx) [1022:9602] 00:04.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 0) [1022:9604] 00:05.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 1) [1022:9605] 00:06.0 PCI bridge [0604]: Advanced Micro Devices [AMD] RS780 PCI to PCI bridge (PCIE port 2) [1022:9606] 00:11.0 SATA controller [0106]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] 00:12.0 USB controller [0c03]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] 00:12.1 USB controller [0c03]: Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1 Controller [1002:4398] 00:12.2 USB controller [0c03]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] 00:13.0 USB controller [0c03]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] 00:13.1 USB controller [0c03]: Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1 Controller [1002:4398] 00:13.2 USB controller [0c03]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] 00:14.0 SMBus [0c05]: Advanced Micro Devices [AMD] nee ATI SBx00 SMBus Controller [1002:4385] (rev 3a) 00:14.1 IDE interface [0101]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] 00:14.2 Audio device [0403]: Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel HDA) [1002:4383] 00:14.3 ISA bridge [0601]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 LPC host controller [1002:439d] 00:14.4 PCI bridge [0604]: Advanced Micro Devices [AMD] nee ATI SBx00 PCI to PCI Bridge [1002:4384] 00:14.5 USB controller [0c03]: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 USB OHCI2 Controller [1002:4399] 00:18.0 Host bridge [0600]: Advanced Micro Devices [AMD] Family 11h Processor HyperTransport Configuration [1022:1300] (rev 40) 00:18.1 Host bridge [0600]: Advanced Micro Devices [AMD] Family 11h Processor Address Map [1022:1301] 00:18.2 Host bridge [0600]: Advanced Micro Devices [AMD] Family 11h Processor DRAM Controller [1022:1302] 00:18.3 Host bridge [0600]: Advanced Micro Devices [AMD] Family 11h Processor Miscellaneous Control [1022:1303] 00:18.4 Host bridge [0600]: Advanced Micro Devices [AMD] Family 11h Processor Link Control [1022:1304] 01:05.0 VGA compatible controller [0300]: Advanced Micro Devices [AMD] nee ATI RS780M/RS780MN [Mobility Radeon HD 3200 Graphics] [1002:9612] 08:00.0 Network controller [0280]: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] (rev 01) 09:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 02)

    Read the article

  • Windows XP Pro SP3 stop error code 0x000000F4

    - by Andrew Ford
    I have a system running Windows XP Pro SP3. My wife is the primary user of this system, and the last several days in a row, when she tries to log in to the system it gives her a BSOD with the stop error code 0x000000F4. The rest of the error codes change every time she tries to log on, but that one seems to stay constant. The error it gives me is: A process or thread crucial to system operation has unexpectedly exited or been terminated. The machine will also get stuck in a boot loop, where it keeps giving me the screen saying that windows did not start successfully, and to choose how to start windows. I have tried Safe Mode, Last known Good Config, and Normally, and all have resulted in either a return to the boot loop, or BSOD. What might this mean? How can I fix it, without doing a clean install?

    Read the article

  • phpbb users table entries deletion and its effects. what are all the clean up work before deleting an user

    - by Jayapal Chandran
    I am writing a window program which will run from the system tray. which will ping my phpbb board site to fetch new users registration information. So with the result i can check whether the user is spam user or not. if i feel it is a spam user then i will delete that entry from the users table. before deleting the users table what are all the other table that i should delete. so that there will not be any unlinked references which will then in due course of time gets numerous and waste of disk space. so i want to know what i should do before deleting an user so that all his other activities should be cleaned off before i deleting a user.

    Read the article

  • Ruby net:LDAP returns "code = 53 message = Unwilling to perform" error

    - by Yong
    Hi, I am getting this error "code = 53, message = Unwilling to perform" while I am traversing the eDirectory treebase = "ou=Users,o=MTC". My ruby script can read about 126 entries from eDirectory and then it stops and prints out this error. I do not have any clue of why this is happening. I am using the ruby net:LDAP library version 0.0.4. The following is an excerpt of the code. require 'rubygems' require 'net/ldap' ldap = Net::LDAP.new :host => "10.121.121.112", :port => 389, :auth => {:method => :simple, :username => "cn=abc,ou=Users,o=MTC", :password => "123" } filter = Net::LDAP::Filter.eq( "mail", "*mtc.ca.gov" ) treebase = "ou=Users,o=MTC" attrs = ["mail", "uid", "cn", "ou", "fullname"] i = 0 ldap.search( :base => treebase, :attributes => attrs, :filter => filter ) do |entry| puts "DN: #{entry.dn}" i += 1 entry.each do |attribute, values| puts " #{attribute}:" values.each do |value| puts " --->#{value}" end end end puts "Total #{i} entries found." p ldap.get_operation_result Here is the output and the error at the end. Thank you very much for your help. DN: cn=uvogle,ou=Users,o=MTC mail: --->[email protected] fullname: --->Ursula Vogler ou: --->Legislation and Public Affairs dn: --->cn=uvogle,ou=Users,o=MTC cn: --->uvogle Total 126 entries found. OpenStruct code=53, message="Unwilling to perform"

    Read the article

  • Code to update HyperV Export file

    - by Andy Schneider
    I am using the HyperV Module from Codeplex to do a "config only" export from a 2008R2 Hyper-V server. In order to import the configuration on another HyperV server, I need to edit the value of CopyVMStorage in the EXP file. This file is an XML file. I wrote the following code in PowerShell to do the update for me. The variable $existing is the existing exp file. $xml = [xml](get-content $existing) $xpath = '//PROPERTY[@NAME ="CopyVmStorage"]' foreach ($node in $xml.SelectNodes($xpath)) {$node.Value = 'TRUE'} $xml.Save($existing) This code makes the correct changes to the XML. However, when I go to import the file on the Hyper-V server, I get an error that says the file format is incorrect. I am wondering if the encoding of the file is incorrect or if there is something else going on. If I edit the file manually in wordpad, it imports without an issue. The filename is a GUID with a .exp extension, and it appears that the file name is too long for notepad to open. Notepad throws an error trying to open the file, which is why I went with WordPad. I have noticed that the file that is updated with PowerShell comes out formatted whereas the raw file is xml all bunched together with no whitespace. Any ideas on what "file format" means in this HyperV error message and how I might be able to use my code to automate this change in the XML without changing the file format?

    Read the article

  • QR Codes Printing, but Not Printing Correctly - Any Ideas?

    - by SDS
    I am mail merging some QR codes via file paths stored in Excel into a label template in MS Word 2013. I have the whole process with the Ctrl+F9 working properly, but I am stumped on this: On the 30 label sheet I am trying to print I have 6 labels that are repeating information, and stored in duplicated rows in Excel for this print job. All of the labels have 2 images on them, one is a logo and the other one is a unique QR code for that person. For the first set of 6 labels that print out, everything works perfect. However, from the 2nd time the information is printed onward all of the merged fields and logo look correct, but the QR codes are printing strangely. Basically it's the QR code as I want it, but with a copy of itself covering the top left 25% of the QR code. Print preview doesn't show this happening, only once it's printed does it come out like this. I've been trying everything I can think of to fix this and don't know what to do. So far I've: Recreated the document several times, tried duplicating the images in the source folder and giving the links in the Excel document new file paths in case the mail merge feeding from the same .jpg was an issue (even though it's not a problem with the logo) Any help or insight is greatly appreciate because this is a test run for a larger batch run that I need to get done soon :( Thank you!

    Read the article

  • free Oracle Open World pass? Help us to clean the Ocean Beach!

    - by JuergenKress
    Volunteer for Coastal Cleanup; Receive a Complimentary Discover Pass Coastal Cleanup Day is California’s largest volunteer event and this year, you can help by joining Oracle employees and partners at the Ocean Beach cleanup in San Francisco. Participation earns you an Oracle T-shirt, the opportunity to sign up for an Oracle OpenWorld Discover Pass, and inclusion in the group photo that will be displayed on the Oracle OpenWorld and JavaOne Websites. When: September 15, 9 a.m. to 12:00 p.m. Where: San Francisco’s Ocean Beach To register and for more information, go to bitly.com/oceancleanup

    Read the article

  • free Oracle Open World pass? Help us to clean the Ocean Beach!

    - by JuergenKress
    Volunteer for Coastal Cleanup; Receive a Complimentary Discover Pass Coastal Cleanup Day is California’s largest volunteer event and this year, you can help by joining Oracle employees and partners at the Ocean Beach cleanup in San Francisco. Participation earns you an Oracle T-shirt, the opportunity to sign up for an Oracle OpenWorld Discover Pass, and inclusion in the group photo that will be displayed on the Oracle OpenWorld and JavaOne Websites. When: September 15, 9 a.m. to 12:00 p.m. Where: San Francisco’s Ocean Beach To register and for more information, go to bitly.com/oceancleanup

    Read the article

  • How to clean launch a GUI app via the Terminal (so it doesn't wait for termination)?

    - by Peter.O
    Some GUI apps launch cleanly via the Terminal command line. Some don't, and they cause the Terminal to wait for the app to terminate. ...and even then, some don't "release" the command line. The mysterious ampersand "&" suffix, seems to cause the terminal to put the process into the background... (but I'm not sure what happens there). Is there a way to launch an app via the Terminal, so that there is no "hang on" effect? ... just like launching something via F2. I'd like to have the command line available again, immediately (without something still in the background and writing out system message in the terminal).

    Read the article

  • Manual Http error response code in non-existent folder via routing

    - by Slytherin
    Apache server running on ubuntu-like linux I am getting unexpected behaviour when i try to manually send error response. If my .htaccess is responsible for the error response , then appropriate error document is loaded and displayed , with according response code in browser console. However , if my router is origin of the response code , then i get blank screen , but correct response code. .htaccess looks like this RewriteEngine On # RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !\.(css|js|icon|zip|rar|png|jpg|gif|pdf)$ index.php [L] ErrorDocument 404 /err/404.html ErrorDocument 403 /err/403.html ErrorDocument 500 /err/500.html part of my router that sends the response is the following header("HTTP/1.1 403 Forbidden"); trying this format didnt help either header("HTTP/1.1 403 Forbidden", TRUE, 403); I also tried HTTP/1.0. Furthermore i was thinking that maybe relative path to error page might be an issue , but discarded this idea after attempting to access a document that is forbidden via .htaccess EDIT I should also point out , this scenario happens when URL for not-existing article is requested. Is it possible that Server is looking for a .htaccess file in a folder based on URL ? Eg: domain/blog/non-existent , is server looking for blog folder ? I am specifically asking this because there is no blog folder

    Read the article

  • Getting Run time 1004 error in code

    - by krishna123
    I tried the code provided by vba express for combining sheet, while execution it is displaying Run Time error 1004: Application Defined or Object Defined Error: My Scenario is: I have a Excel, in that I have first sheet "Connection" and after it I have Sheet1, Sheet2 and so on. I am combining all sheets except Sheet"Conection" by saying start with sheet2. I tried following line of code to exclude "Connection" sheet: If Not Sheet.Name = "Connection" then but it did not work. Whatever the sheets I have in some of them I have large data in some cells. Here is the code which I am using: I have highlighted the line Sub CopyFromWorksheets() Dim wrk As Workbook 'Workbook object - Always good to work with object variables Dim sht As Worksheet 'Object for handling worksheets in loop Dim trg As Worksheet 'Master Worksheet Dim rng As Range 'Range object Dim colCount As Integer 'Column count in tables in the worksheets Set wrk = ActiveWorkbook 'Working in active workbook For Each sht In wrk.Worksheets If sht.Name = "Master" Then sht.Delete Exit Sub End If Next sht 'We don't want screen updating Application.ScreenUpdating = False 'trg.SaveAs "C:\temp\CPReport1.xls" 'Add new worksheet as the last worksheet Set trg = wrk.Worksheets.Add(After:=wrk.Worksheets(wrk.Worksheets.Count)) 'Rename the new worksheet trg.Name = "Master" 'Get column headers from the first worksheet 'Column count first Set sht = wrk.Worksheets(2) colCount = sht.Cells(1, 255).End(xlToLeft).Column 'Now retrieve headers, no copy&paste needed With trg.Cells(1, 1).Resize(1, colCount) .Value = sht.Cells(1, 1).Resize(1, colCount).Value 'Set font as bold .Font.Bold = True End With trg.SaveAs "C:\temp\CPReport1.xls" 'We can start loop 'Skip Sheet - Connection If Not sht.Name = "Connection" Then For Each sht In wrk.Worksheets 'If worksheet in loop is the last one, stop execution (it is Master worksheet) If sht.Index = wrk.Worksheets.Count Then Exit For End If 'Data range in worksheet - starts from second row as first rows are the header rows in all worksheets Set rng = sht.Range(sht.Cells(2, 1), sht.Cells(65536, 1).End(xlUp).Resize(, colCount)) 'Put data into the Master worksheet '----------------- Error in below line -------------------------------------------------- trg.Cells(65536, 1).End(xlUp).Offset(1).Resize(rng.Rows.Count, rng.Columns.Count).Value = rng.Value '---------------------------------------------------------------------------------------- Next sht End If 'Fit the columns in Master worksheet trg.Columns.AutoFit 'Dim dest, destyfile 'dest = "E:\Test_Merge\" 'destyfile = dest & "_" & trg.Name 'trg.SaveAs (destyfile) 'Screen updating should be activated Application.ScreenUpdating = True End Sub

    Read the article

  • help in the Donalds B. Johnson's algorithm, i cannot understand the pseudo code (PART II)

    - by Pitelk
    Hi all , i cannot understand a certain part of the paper published by Donald Johnson about finding cycles (Circuits) in a graph. More specific i cannot understand what is the matrix Ak which is mentioned in the following line of the pseudo code : Ak:=adjacency structure of strong component K with least vertex in subgraph of G induced by {s,s+1,....n}; to make things worse some lines after is mentins " for i in Vk do " without declaring what the Vk is... As far i have understand we have the following: 1) in general, a strong component is a sub-graph of a graph, in which for every node of this sub-graph there is a path to any node of the sub-graph (in other words you can access any node of the sub-graph from any other node of the sub-graph) 2) a sub-graph induced by a list of nodes is a graph containing all these nodes plus all the edges connecting these nodes. in paper the mathematical definition is " F is a subgraph of G induced by W if W is subset of V and F = (W,{u,y)|u,y in W and (u,y) in E)}) where u,y are edges , E is the set of all the edges in the graph, W is a set of nodes. 3)in the code implementation the nodes are named by integer numbers 1 ... n. 4) I suspect that the Vk is the set of nodes of the strong component K. now to the question. Lets say we have a graph G= (V,E) with V = {1,2,3,4,5,6,7,8,9} which it can be divided into 3 strong components the SC1 = {1,4,7,8} SC2= {2,3,9} SC3 = {5,6} (and their edges) Can anybody give me an example for s =1, s= 2, s= 5 what if going to be the Vk and Ak according to the code? The pseudo code is in my previous question in http://stackoverflow.com/questions/2908575/help-in-the-donalds-b-johnsons-algorithm-i-cannot-understand-the-pseudo-code and the paper can be found at http://stackoverflow.com/questions/2908575/help-in-the-donalds-b-johnsons-algorithm-i-cannot-understand-the-pseudo-code thank you in advance

    Read the article

  • How can I write good "research code"?

    - by John
    "Research code" is often held up as a paragon of what not to do when writing software. Certainly, the kind of code that often results from trying to solve a research problem can end up being poorly-designed, difficult to debug, etc. But my question is this: does research code have to be this way? Is it possible to write good research code? Is the only approach to consider the first version a poorly-written prototype to be discarded in favour of the better-designed second version? Software engineering has all sorts of best practices about how to design and write good code, but I don't usually find this relevant when you don't have a good idea ahead of time what the final system will look like. The final system is likely to be a result of what did or didn't work along the way, and the only way to determine what does or doesn't work is to write the code first. As you find things that don't work, you change what the final system looks like, moving further away from your original design (assuming you had one). I'd be interested in any personal experience with these issues, as well as any books or other resources anyone can point me to.

    Read the article

  • Best practices to develop and maintaing code for complex JQuery/JQueryUI based applications

    - by dafi
    I'm working on my first very complex JQuery based application. A single web page can contain hundreds of JQuery related code for example to JQueryUI dialogs. Now I want to organize code in separated files. For example I'm moving all initialization dialogs code $("#dialog-xxx").dialog({...}) in separated files and due to reuse I wrap them on single function call like dialogs.js function initDialog_1() { $("#dialog-1").dialog({}); } function initDialog_2() { $("#dialog-2").dialog({}); } This simplifies function code and make caller page clear $(function() { // do some init stuff initDialog_1(); initTooltip_2(); }); Is this the correct pattern? Are you using more efficient techniques? I know that splitting code in many js files introduces an ugly band-bandwidth usage so. Does exist some good practice or tool to 'join' files for production environments? I imagine some tool that does more work than simply minimize and/or compress JS code.

    Read the article

  • Cache efficient code

    - by goldenmean
    This could sound a subjective question, but what i am looking for is specific instances which you would have encountered related to this. 1) How to make a code, cache effective-cache friendly? (More cache hits, as less cahce misses as possible). from both perspectives, data cache & program cache(instruction cache). i.e. What all things in one's code, related to data structures, code constructs one should take care of to make it cache effective. 2) Are there any particular data structures one must use, must avoid,or particular way of accessing the memers of that structure etc.. to make code cache effective. 3) Are there any program constructs(if, for, switch, break, goto,...), code-flow(for inside a if, if inside a for, etc...) one should follow/avoid in this matter? I am looking forward to hear individual experiences related to making a cache efficient code in general. It can be any programming language(C,C++,ASsembly,...), any hardware target(ARM,Intel,PowerPC,...), any OS(Windows,Linux,Symbian,...) etc.. More the variety, it will help better to understand it deeply.

    Read the article

  • How to read utf-8 xml from vbs and get correct character code

    - by vkjr
    I'm trying to read xml file from vbs script. Xml is encoded in utf-8 and has appropriate header From vbs script I use microsoft xmldom parser to read xml: Dim objXMLDoc Set objXMLDoc = CreateObject( "Microsoft.XMLDOM" ) objXMLDoc.load("vbs_strings.xml") Inside xml I'm trying to write character by code using &#nnn; notation. Then I read this character from vbscript and try to get it's code using Asc() function. For some characters it works fine and read code is equal to one written. But for some characters Asc() always returns code 63. What could it be? Examples: If xml contains <section>&#195;<section> and in script I have Section variable for representing this xml node then code: Asc(Section.Text) will return value 195 and it's ok. If xml contains <section>&#110;<section> then code: Asc(Section.Text) will return value 110 and it's ok. But if xml contains <section>&#130;<section> or <section>&#156;<section> or <section>&#140;<section> Asc(Section.Text) will return value 63 and it's definitely not good. Do you know why?

    Read the article

  • 'echo' or drop out of 'programming' write HTML then start PHP code again

    - by thecoshman
    For the most part, when I want to display some HTML code to be actually rendered I would use a 'close PHP' tag, write the HTML, then open the PHP again. eg <?php // some php code ?> <p>HTML that I want displayed</p> <?php // more php code ?> But I have seen lots of people who would just use echo instead, so they would have done the above something like <?php // some php code echo("<p>HTML that I want displayed</p>"); // more php code ?> Is their any performance hit for dropping out and back in like that? I would assume not as the PHP engine would have to process the entire file either way. What about when you use the echo function in the way that dose not look like a function, eg echo "<p>HTML that I want displayed</p>" I would hope that this is purely a matter of taste, but I would like to know if I was missing out on something. I personally find the first way preferable (dropping out of PHP then back in) as it helps draw a clear distinction between PHP and HTML and also lets you make use of code highlighting and hinting for your HTML, which is always handy.

    Read the article

  • php $_FILES error code returning an unexpected error

    - by EmmyS
    I have some code that allows users to upload multiple files at once. It was never getting to a specific point after the upload, so I put in an echo to test for the value of the error code, and it's returning a value that I'm not sure I understand. Here's the code: $tmpTarget = PCBUG_UPLOADPATH; foreach ($_FILES["attachments"]["error"] as $key => $error) { if ($error == UPLOAD_ERR_OK) { $tmp_name = $_FILES["attachments"]["tmp_name"][$key]; $name = str_replace(" ", "_", $_FILES["attachments"]["name"][$key]); move_uploaded_file($tmp_name, "$tmpTarget/$name"); @unlink($_FILES["attachments"]["tmp_name"][$key]); } else { $errorFlag = true; echo "error = $error"; exit; } } The code that creates the attachments field looks like this: for($i=1; $i<=$max_no_img; $i++){ echo "<input type=file name='attachments[]' class='bginput'><br />"; } where $max_no_img is a variable set further up in the code, and PCBUG_UPLOAD path is a constant defined in an included file. Here's what's confusing: after I submit my form, I go and look in my uploads directory, and the files I've selected through the form are there - they uploaded correctly. However, the code is jumping into the else clause and $error is returning 4, which the php manual indicates means that no file was uploaded. Any ideas? The files very clearly are getting where they're supposed to. Is there some other definition of "uploaded" that isn't happening?

    Read the article

  • Can you help with this assembly language code?

    - by Mugen
    Hi, I've been looking through a piece of code of a pc game that I'm trying to "improve". (ok so maybe I suck at the game but I still want to play it). Could you please look into the following code: fld dword ptr[ebp+00007B1C] fsub dword ptr[esp+64] fst dword ptr[ebp+00007B1C] call 004A2E48 This code is called every second for the level countdown timer. I need to stay on a particular level for a few minutes. If I can modify the above code so that the value pushed into the address [ebp+00007B1C] is 0 then the game level will always time out and it will save me playing those crazy "survival" minigames. I'll explain what I understand from this code. Dont worry, you dont have to go deep into this. In the first line we get the timer value. For example if 97 seconds are remaining then it is here that this value is loaded. In the second line a value (1 second) is subtracted from 97. In the third line 96 is again moved to memory. And finally we have the function call that will do other processing based on the time remaining. Now all I need to do is patch this piece of code somehow so that the value that is pushed is 0 (in the third step). Can you please help me out with this?

    Read the article

  • Linking the Linker script file to source code

    - by user304097
    Hello , I am new to GNU compiler. I have a C source code file which contains some structures and variables in which I need to place certain variables at a particular locations. So, I have written a linker script file and used the __ attribute__("SECTION") at variable declaration, in C source code. I am using a GNU compiler (cygwin) to compile the source code and creating a .hex file using -objcopy option, but I am not getting how to link my linker script file at compilation to relocate the variables accordingly. I am attaching the linker script file and the C source file for the reference. Please help me link the linker script file to my source code, while creating the .hex file using GNU. /*linker script file*/ /*defining memory regions*/ MEMORY { base_table_ram : org = 0x00700000, len = 0x00000100 /*base table area for BASE table*/ mem2 : org =0x00800200, len = 0x00000300 /* other structure variables*/ } /*Sections directive definitions*/ SECTIONS { BASE_TABLE : { } > base_table_ram GROUP : { .text : { } { *(SEG_HEADER) } .data : { } { *(SEG_HEADER) } .bss : { } { *(SEG_HEADER) } } > mem2 } C source code: const UINT8 un8_Offset_1 __attribute__((section("BASE_TABLE"))) = 0x1A; const UINT8 un8_Offset_2 __attribute__((section("BASE_TABLE"))) = 0x2A; const UINT8 un8_Offset_3 __attribute__((section("BASE_TABLE"))) = 0x3A; const UINT8 un8_Offset_4 __attribute__((section("BASE_TABLE"))) = 0x4A; const UINT8 un8_Offset_5 __attribute__((section("BASE_TABLE"))) = 0x5A; const UINT8 un8_Offset_6 __attribute__((section("SEG_HEADER"))) = 0x6A; My intention is to place the variables of section "BASE_TABLE" at the address defined i the linker script file and the remaining variables at the "SEG_HEADER" defined in the linker script file above. But after compilation when I look in to the .hex file the different section variables are located in different hex records, located at an address of 0x00, not the one given in linker script file . Please help me in linking the linker script file to source code. Are there any command line options to link the linker script file, if any plese provide me with the info how to use the options. Thanks in advance, SureshDN.

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >