Search Results

Search found 120 results on 5 pages for 'roberto aloi'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • [PHP] Invalid argument supplied for foreach()

    - by Roberto Aloi
    It often happens to me to handle data that can be either an array or a null variable and to feed some foreach with these data. $values = get_values(); foreach ($values as $value){ ... } When you feed a foreach with data that are not an array, you get a warning: Warning: Invalid argument supplied for foreach() in [...] Assuming it's not possible to refactor the get_values() function to always return an array (backward compatibility, not available source code, whatever other reason), I'm wondering which is the cleanest and most efficient way to avoid these warnings: Casting $values to array Initializing $values to array Wrapping the foreach with an if Other (please suggest)

    Read the article

  • Identifying PHP unused variables (in Emacs)?

    - by Roberto Aloi
    Is it somehow possible to identify unused variables in a PHP file in Emacs? With other languages, this is possible by using tools such as flymake. I've already enabled Flymake to show syntax errors for my PHP files on the fly, but still it's frustrating that PHP logic errors are sometimes due to situations like: <?php $foo = whatever(); $bar = something($fo); ... Note the typo on $foo that will contribute to the developer's headache and to his exorbitant use of coffee.

    Read the article

  • Watermarking Flash Videos (server-side)

    - by Roberto Aloi
    Hi all, I have a bunch of flash videos that I need to watermark with user related information, to make illegal re-distribution of these files harder. I'm wondering how can this be done server-side. If done client-side, it will be quite easy for the user to intercept the videos before they are watermarked. Since the watermark should contain user-specific information I can't really watermark the videos before encoding them (unless I have an encoded video per user - not feasible). I'm expecting this to affect the streaming performances a lot, though. Any idea how this can be done (possibly in an efficient way)?

    Read the article

  • Tracing Erlang Functions - Short forms

    - by Roberto Aloi
    As you might know, it's now possible to trace Erlang functions by using the short form: dbg:tpl(Module, Function, x). Instead of the usual: dbg:tpl(Module, Function, dbg:fun2ms(fun(_) -> exception_trace() end)). I'm actually wondering if a similar short form is available for return_trace(). Something like: dbg:tpl(Module, Function, r). Instead of: dbg:tpl(Module, Function, dbg:fun2ms(fun(_) -> return_trace() end)). The source code in the dbg module seems to suggest not: new_pattern_table() -> PT = ets:new(dbg_tab, [ordered_set, public]), ets:insert(PT, {x, term_to_binary([{'_',[],[{exception_trace}]}])}), ets:insert(PT, {exception_trace, term_to_binary(x)}), PT. But I might be wrong. Do you know of any?

    Read the article

  • Erlang Edoc in Emacs

    - by Roberto Aloi
    Let's say that I have an Erlang function, with spec. -spec foo(integer(), string()) -> boolean(). foo(_Integer, _String) -> true. My dream would be to generate the edoc from this information within Emacs automatically. The generated code should look like: %%-------------------------------------------------------------------- %% @doc %% Your description goes here %% @spec foo(_Integer::integer(), _String::string()) -> %%% boolean() %% @end %%-------------------------------------------------------------------- -spec foo(integer(), string()) -> boolean(). foo(_Integer, _String) -> true. Does a similar feature already exist?

    Read the article

  • Adding International support in Erlang Web 1.4

    - by Roberto Aloi
    I'm trying to add international support for a website based on the Erlang Web 1.4. I would like to have a couple of links on every page (the notorious Country flags) that allow the user to set his language session variable. What I have right now is a link like: <li><a href="/session/language/en">English</a></li> Where, in the session controller I do: language(Args) -> LanguageId = proplists:get_value(id, Args), case language_is_supported(LanguageId) of false -> ok; true -> wpart:fset("session:lang", LanguageId) end, {redirect, "/"}. The problem is that, after setting the preferred language, I would like the user to be redirected to the page he was visiting before changing the language. In this case the "__path" variable doesn't help because it contains the language request and not the "previous" one. How could I resolve this situation? I'm probably using the wrong approach but I cannot thing to anything else right now.

    Read the article

  • Disable work offline in Internet Explorer 8

    - by Roberto Liffredo
    I am using Windows 7, and IE8. Every time I have GMail open in IE8, and I resume from sleep, I get the question about working offline - even if at that momoent the wireless connection is available. This is particularly sad, because all browsing is stopped until I dismiss that dialog, that may be hidden below other windows. As I am not using offline browsing at all, is it possible to disable the functionality altogether, so that I no longer get the question? A bit like in Firefox, where I simply get the error message with page unavailable. I have googled a bit, but no luck so far. Even a direct modification of the registry would be fine, for me.

    Read the article

  • Router slowing my connection?

    - by Roberto
    I have a Linksys WRT54G and I pay for a 12Mbps connection. I've been testing my connection using speedtest.net for many days and always get 8Mbps. I called the support and they told me to bypass the router and test. I did it and got 16Mbps (much more than I pay for), so I thought "this guy just changed my speed so can he blame my router", and he blamed it. But to my surprise, everytime I bypass the router I get 16Mbps and when I use the router I get 8Mbps. Is this guy trolling me somehow (configuring the VOIP-modem-stuff to different profiles depending o the MAC address connecting to it) or is my router a POS? How can I find out? I don't know what's the thing the router connects to, it's a kind of VOIP adapter; the link is this one, but unfortunately I don't think you'll understand because it's in Portuguese. I know they can remotely connect to it, that's the origin of my conspiracy theory :) I just tested wired to the router and got 10Mbps (and still 8Mbps on wifi and 16Mbps without router) O_o I'm 5cm away from my router, so no obstacles to interfere, right? ------ UPDATE ------- It's a WRT54G V8, I'm using firmware v8.00.7 (will install 8.00.8 tomorrow, but I saw that it's only a minor fix to UPnP denial of service security vulnerability). Results: IPerf LAN-LAN: 80Mbps IPerf LAN-WLAN: 19Mbps (therefore we can ignore wireless issues/settings) I wasn't able to make the (W)LAN-WAN NAT-enabled test with IPerf, I get a connection refused error. I'm not sure if did it right: ran in server mode, configured router to forward that port to my IP and tried to connect to my internet IP that got from this site. I don't think there is a way to disable NAT using this firmware. Question: Let's suppose it's an underpowered hardware issue. Is it right to assume that custom firmwares could resolve the issue because they are possibly better implemented and would make better use of the router resources? I couldn't find any references pointing to wired performance improvements with the use of custom firmware.

    Read the article

  • Remote Desktop Client Crashes following domain join

    - by Roberto Charlie Ciarleglio
    I recently joined my laptop to our windows domain and now the remote desktop client crashes when i try and connect to any machine. It works if I run as administrator but not ordinarily. The domain join migrated my local profile to the domain profile which i think is where the problem lies. I'm guessing its a permission thing as I had a similar problem with dropbox and had to delete reg keys and reinstall. I can't figure out how to fix this problem though. The event viewer shows this: Faulting application name: mstsc.exe, version: 6.1.7601.17514, time stamp: 0x4ce7ab44 Faulting module name: FACredProv2.dll, version: 2.4.95.1, time stamp: 0x4bb8d766 Exception code: 0xc0000005 Fault offset: 0x00000000000025b2 Faulting process id: 0xb24 Faulting application start time: 0x01cd43fbd3a81fba Faulting application path: C:\Windows\System32\mstsc.exe Faulting module path: C:\Windows\System32\FACredProv2.dll Report Id: 154ee55a-afef-11e1-a443-b8ac6f704c5d any help would be appreciated!

    Read the article

  • Is my HDD dead forever?

    - by Roberto
    Yesterday I turned on my computer and it couldn't boot. I found out the hd (320GB SATA Seagate Momentus 7200.3 for notebook) was broken and it couldn't be recognized by the BIOS. I have another of the same hard drive, so I exchanged the boards. I found out that there is a problem on its board since my good hard drive didn't work. But the broken hard drive doesn't work with the good board as well: it can be recognized but when I insert a Windows Instalation DVD it says the hard drive is 0GB. I put it in a case and use it in another computer via USB, and but it doesn't show up in the "My Computer". I used a software to recover files called "GetDataBack for NTFS", it recognized the hard drive but with the wrong size (2TB). I try to make it read the hard drive but it got an I/O error reading sector. It tries to read, the hard drive spins up. So, since I'm using a good board on it, the problem seems to be internal. Is there anything someone could do to recover the files from it?

    Read the article

  • Tunneling traffic through two VPN hops/tunnels.

    - by Roberto Sebestyen
    I am a web developer, and I find myself often working from home. But when I do, I am forced to Remote Desktop to the Office desktop computer and work from there. The reason is because the application I am working on needs to connect to servers at a Data Center via a VPN from the Office Desktop. HomeDesktop (Win7) --- PVN --- OfficeDesktop(WinXP) --- VPN --- Data Center What I would really like to do is, I would like to find a way to be using my Home desktop developing on that, and whenever my computer tries to access servers on the Data Center, I would like to tunnel that traffic through the two VPN tunnels separating me and the Data Center. I have admin privileges on both Office Desktop and Home Desktop, but I do not have any admin privileges in the Data Center. So what kind of tunneling solution could I use here? Is it even possible?

    Read the article

  • Can't ping a DNS zone on windows server 2008 R2

    - by Roberto Fernandes
    I´ve just configured a windows server 2008 r2, but got a lot of problems on DNS role. Let me talk about the server configuration: name: fdserver IP address: 192.168.0.10 I have a DNS zone called "fd.local". This is my domain and it´s working ok. I´ve created a zone called fdserver, and inside this zone a record (A) with "*" as a host. because this is a webserver, i´ve configured apache so if you enter something like "site.fdserver" it will point you to the "site" folder. This is working ok ONLY inside the server. This server is a DNS server too... and have 3 entries: 192.168.0.10 (his own IP), 8.8.8.8 and 8.8.4.4 (google public DNS). Now start the problems... Most of the computers on my network, CAN join the domain without problems. But just CAN'T ping "something.fdserver". Now comes the strange thing... If I remove the twoo secondary entries on my DNS server (8.8.8.8 and 8.8.4.4), it obvious stop accessing websites (like microsoft.com), but now the computer CAN ping "something.fdserver". I don´t know If I explained correctly... and my English is terrible... but inside the server is all working as it supposed to work. But in the workstation machines, it work only if I remove the secondary DNS!! If you need any details, just ask! thanks!

    Read the article

  • How to host many websites using same public IP address but different domains.

    - by Roberto Sebestyen
    I know how to configure one IIS instance to run many websites using the same public ip address, but different domain names (As long as I have control over the domains). But how can you configure many IIS servers running on different virtual machines in the same network, to host websites using the same public IP addres, but different domain names? Normailly in IIS under the website you can set the headers to which the website will respond to. but what if that website is on a different machine?

    Read the article

  • Make a drive from one machine appear as a physical disk in another machine.

    - by Roberto Sebestyen
    I want to take a physical disk (or part of a disk) in one machine (call it machine-A) and I want to make it available in another machine (machine-B). But I don't want to map a network drive. I want it to appear in machine-B as a physical drive. Even though it is not a physical drive. The reason I want to do this is i want the ability to create shares in machine-B on that drive. Since I cannot do that on mapped drives, I need to use some utility that fools machine-B to think that it is a physical drive, and treat it as such. Both of these machines are windows server 2003. I heard about NFS, It sounds like what could be the solution to my problem. But isn't that a Linux/Unix protocol? What tools can I use to make this happen? Are there any open source solutions? I don't care what the solution is, as long as it achieves the end result, preferably open source solution though. Thanks for reading guys and gals!

    Read the article

  • Does informing your destination hardware impact on ebook convertion on Calibre?

    - by Roberto
    If I connect my Kindle Fire to the computer, Calibre gives me an option to convert to Kindle Fire mobi format. Is this different from just asking to convert to mobi? I don't want to connect my Kindle anymore, I want to send to the cloud, but I'm not willing to lose conversion quality because of lack of ebook reader information. Of course, I couldn't find the convert to Kindle option without it being connected.

    Read the article

  • Mavericks: Safari does not login in into web services

    - by Roberto
    Since when I upgraded ML to Mavericks Safari is no longer able to log me into Facebook. When I go to the login page it suggests me the correct credentials, I hit the Login button, the page refreshes but nothing happens, like if the credentials where empty. Firefox works perfectly, I even logged out and back in to make sure the credentials are the same that Safari suggests, and so they are. Needless to say for a different user on the same Mavericks Safari logs in correctly. The same happens with most web pages that need a login, web mails for instances, I have tow accounts on different webmail providers and none of them works. Of course using the same mail services with POP3 works fine. Even on this very site I cannot post a thing with Safari, I'm going to switch to Firefox to be able to post this question. Again, Firefox or a different user are OK. Do you have any idea/suggestion?

    Read the article

  • Free tools for analyzing client-server communication issues

    - by roberto
    Hi, we have some issues with a client-server based application and we would like to better understand client-server communication without going to the software company that sold the application. At least we would like to perform the analysis in parallel. Can you suggest to me a dummy proof application that we can easily get and install to analyze client-server traffic? Many thanks!

    Read the article

  • Free tools for analizing client-server comunication issues

    - by roberto
    Hi, we have some issues with a client-server based application and we would like to better understand client-server comunication without going to the software company that sold the application. At least we would like to perform the analysis in parallel. Can you suggest to me a dummy proof application that we can easily get and install to analise client-server traffic? Many thanks!

    Read the article

  • Under *nix, how can I find a string within a file within a directory ?

    - by roberto
    Hi all. I'm using ubuntu linux, and I use bash from with a terminal emulator every day for many tasks. I would like to know how to find a string or a substring within a file that is within a particular directory. If I was knew the file which contained my target substring, I would just cat the file and pipe it through grep, thus: cat file | grep mysubstring But in this case, the pesky substring could be anywhere within a known directory. How do I hunt down my substring ?

    Read the article

  • HDD dead forever???

    - by Roberto
    Yesterday I turned on my computer and it couldn't boot. I found out the hd (320GB SATA Seagate Momentus 7200.3 for notebook) was broken, it couldn't be recognized by the BIOS. I have another of the same hd, so I exchanged the boards. I found out that there is a problem on its board since my good hd didn't work. But the broken hd doesn't work with the good board as well: it can be recognized but when I insert a Windows Instalation DVD it says the hd is 0GB. I put it in a case and use it in another computer via USB, and but it doesn't show up in the "My Computer". I used a software to recover files called "GetDataBack for NTFS", it recognized the hd but with the wrong size (2TB). I try to make it read the hd but it get an I/O error reading sector. It tries to read, the hd spins... So, since I'm using a good board on it, the problem seems to be internal. Is there anything someone could do recover the files from it?

    Read the article

  • "destination host unreachable" while ping attempt between 2 pc on 1 network

    - by Roberto Sadfasdf
    I have 2 computers in my network ones ip address is 192.168.2.31(PC-A) and the others is 192.168.2.33(PC-B). When I'm trying to ping from PC-B to PC-A it says: Pinging 192.168.2.33 with 32 bytes of data: Reply from 192.168.2.31: Destination host unreachable. Reply from 192.168.2.31: Destination host unreachable. Reply from 192.168.2.31: Destination host unreachable. Reply from 192.168.2.31: Destination host unreachable. Ping statistics for 192.168.2.33: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss) And when i'm trying the otherwise it tells me same message with ip address switched..They are both can connect to the Internet

    Read the article

  • Multiple "setups" on windows 7

    - by Roberto
    I would like to create multiple setups on Windows, that is, when I'm working with my computer I have some programs opened, after that I would like to change the setup/user to the "gaming setup" where the previous setup would hibernate and the computer would have all the resources free for me to play. I could have opened multiple tabs on firefox on each setup and they would be there when I come back. I understand that windows' switch user would make the programs run when I'm with the other user and that's not what I want. So, is that possible?

    Read the article

  • Google I/O 2012 - SPDY: It's Here!

    Google I/O 2012 - SPDY: It's Here! Roberto Peon SPDY makes your web pages faster over SSL than they'd be over HTTP. We'll talk about why you should care, give tips about how to take advantage of its features, talk about working implementations, and tell you about the future. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 290 22 ratings Time: 43:50 More in Science & Technology

    Read the article

  • Resolving html entities with NSXMLParse on iPhone

    - by Roberto
    Hi all, i think i read every single web page relating to this problem but i still cannot find a solution to it, so here i am. I have an HTML web page wich is not under my control and i need to parse it from my iPhone application. Here it is a sample of the web page i'm talking about: <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> </HEAD> <BODY> <LI class="bye bye" rel="hello 1"> <H5 class="onlytext"> <A name="morning_part">morning</A> </H5> <DIV class="mydiv"> <SPAN class="myclass">something about you</SPAN> <SPAN class="anotherclass"> <A href="http://www.google.it">Bye Bye &egrave; un saluto</A> </SPAN> </DIV> </LI> </BODY> </HTML> I'm using NSXMLParser and it is going well till it find the è html entity. It calls foundCharacters: for "Bye Bye" and then it calls resolveExternalEntityName:systemID:: with an entityName of "egrave". In this method i'm just returning the character "è" trasformed in an NSData, the foundCharacters is called again adding the string "è" to the previous one "Bye Bye " and then the parser raise the NSXMLParserUndeclaredEntityError error. I have no DTD and i cannot change the html file i'm parsing. Do you have any ideas on this problem? Thanks in advance to all of you, Rob. Update (12/03/2010). After the suggestion of Griffo i ended up with something like this: data = [self replaceHtmlEntities:data]; NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data]; [parser setDelegate:self]; [parser parse]; where replaceHtmlEntities:(NSData *) is something like this: - (NSData *)replaceHtmlEntities:(NSData *)data { NSString *htmlCode = [[NSString alloc] initWithData:data encoding:NSISOLatin1StringEncoding]; NSMutableString *temp = [NSMutableString stringWithString:htmlCode]; [temp replaceOccurrencesOfString:@"&amp;" withString:@"&" options:NSLiteralSearch range:NSMakeRange(0, [temp length])]; [temp replaceOccurrencesOfString:@"&nbsp;" withString:@" " options:NSLiteralSearch range:NSMakeRange(0, [temp length])]; ... [temp replaceOccurrencesOfString:@"&Agrave;" withString:@"À" options:NSLiteralSearch range:NSMakeRange(0, [temp length])]; NSData *finalData = [temp dataUsingEncoding:NSISOLatin1StringEncoding]; return finalData; } But i am still looking the best way to solve this problem. I will try TouchXml in the next days but i still think that there should be a way to do this using NSXMLParser API, so if you know how, feel free to write it here :)

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >