Search Results

Search found 73 results on 3 pages for 'gustavo cardoso'.

Page 1/3 | 1 2 3  | Next Page >

  • Retrieve object from jquery in php script

    - by majc
    I'm trying to rebuild an object encoded with Json but i'm not getting any value. JQuery: $.post("views/insert_tasks.php",{ clickedRows : clickrows , <?php echo "tasks:'" . json_encode($tasks) . "'"; ?> }, function(data) { }); this is the PHPcode to retrieve the object: $tasks = json_decode(stripslashes($_POST['tasks']), true); $tasks is empty after execute the code above. This is what I'm getting with the $_POST['tasks']: [{"task_id":"1","description":"<p>Fazer heroi</p>","createdat":"Saturday 22nd of May 2010 11:37:37 PM","createdby":"Miguel Cardoso","max_requests":"2","max_duration":"5","job_id":"Concept Artist"},{"task_id":"2","description":"<p>teste2</p>","createdat":"Sunday 23rd of May 2010 11:23:55 AM","createdby":"Miguel Cardoso","max_requests":"2","max_duration":"5","job_id":"3D Modeller"},{"task_id":"3","description":"<p>teste3</p>","createdat":"Sunday 23rd of May 2010 11:45:39 AM","createdby":"Miguel Cardoso","max_requests":"1","max_duration":"10","job_id":"Writer"}] What I'm doing wrong?

    Read the article

  • WPF Resource Dictionary in a separate assembly

    - by Gustavo Cavalcanti
    I have resource dictionary files (MenuTemplate.xaml, ButtonTemplate.xaml, etc) that I want to use in multiple separate applications. I could add them to the applications' assemblies, but it's better if I compile these resources in one single assembly and have my applications reference it, right? After the resource assembly is built, how can I reference it in the App.xaml of my applications? Currently I use ResourceDictionary.MergedDictionaries to merge the individual dictionary files. If I have them in an assembly, how can I reference them in xaml? Thanks for your help! Gustavo

    Read the article

  • Monodevelop SVN 1.7 support

    - by Gustavo Rubio
    I'm trying to checkout an SVN repo and it does get checked out, however the solution is not opened by default. I then tried to simply open an already checked out folder and I do not get versioning support. I tried this in both Windows and Linux with no success with MonoDevelop 3.0.4 and 3.0.5 My guess is that since the .sln file is in the path /trunk/code/project/project.sln and the new 1.7 format keeps only one ".svn" folder at the top of the checked out folder (e.g. /home/gustavo/ProjectSrc/ ) hence MD not "finding" the versioned code. Anybody has had success using SVN 1.7 and MonoDevelop?

    Read the article

  • AJAX Control Toolkit - Incompatibility with HTMLEditor and UpdatePanel

    - by Guilherme Cardoso
    Unfortunately HTMLEditor component of AJAX Control Toolkit is not compatible with the UpdatePanel. The problem is when we use accents with the Mozilla Firefox browser and HTMLEditor is inside an UpdatePanel. Letters that contain accents are left with an unknown character (so is stored in the database or even returned a PostBack). Can be tested using Mozilla Firefox on the site of the ASP.NET AJAX Control Toolkit.  Write a word with accents and go to "Submit Content": http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HTMLEditor/HTMLEditor.aspx As an alternative to this problem there are multiple component Rich Text Editors, some using jQuery and others not. Queneeshas provided us a list of 10 components that can be viewed here: http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors Hopefully next release of the AJAX Control Toolkit, this inconsistency and others (like the ModalPopup Extender that already referenced in my blog) are resolved once and for all. This is because there are more updated versions prior to that do not have these problems, and with the passing of time some parts were coming into conflict. If you know of any alternative or want to know at this problem, you can visit the topic I created the section of the AJAX Control Toolkit in ASP.NET forum: http://forums.asp.net/p/1548141/3848763.aspx

    Read the article

  • ASP.NET Chart Control - During a PostBack

    - by Guilherme Cardoso
    To use the Chart control from a PostBack is necessary to modify the ChartImg.axd HttpHandler, otherwise we'll get the error message: Error executing child request for ChartImg.axd In Web.Config search the line: <add path = "ChartImg.axd" verb = "GET,HEAD" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" <Add path = "ChartImg.axd" verb = "GET, HEAD" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 " validate = "false" /> Validate = "false" />   Change to: <add path = "ChartImg.axd" verb = "GET,HEAD,POST" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" <Add path = "ChartImg.axd" verb = "GET, HEAD, POST" type = "System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version = 3.5.0.0, Culture = Neutral, PublicKeyToken = 31bf3856ad364e35 " validate = "false" /> validate = "false" /> The attribute that we are adding is the Post.  For those not familiar with this control is very useful for creating graphics. You can see more information here .

    Read the article

  • TestDriven.NET - Free unit test tool for Visual Studio

    - by Guilherme Cardoso
    Developers that use unit testing are familiar with Resharper and his plugin for Unit Testing. For those that like me, don't have a great pc hardware (Pentium 4, 3ghz, 1GB ram) the Resharper can be really slow, and affect the performance of pc. That's why i use TestDriven.NET TestDriven.NET is a freeware license tool (there are others licenses for this product) that gives us the possibility to run unit tests with this plugin, that's integrated with Visual Studio. You can check some screenshots here: http://www.testdriven.net/Screenshots.aspx It's compatible with: NUnit, MbUnit, MSTest, NCover, Reflector, TypeMock, dotTrace and MSBee. More information and free download here: http://www.testdriven.net

    Read the article

  • AjaxToolKit - ModalPopup conflicts with the current stable version

    - by Guilherme Cardoso
    For those who are using the current stable version of AjaxToolKit (40 412) will face an annoying problem. The ModalPopup cannot be used together with an UpdatePanel and one textbox. This is because during the postback, the value of the textbox will be changed and added a comma. That is, if we use a ModalPopup to have a form and then we add a database, the value "Antonio" in the text box will be entered as "Antonio." I've been researching a bit and this bug is even launching this version. To counter this I'm using the stable 30 512 May 2009 - http://ajaxcontroltoolkit.codeplex.com/releases/view/27326 One detail I noticed was that the ModalPopup OkControlID on the property. If we define the event does not occur (example: If this button is add the data to the database, the panel controlled by ModalPopup disappears but not to add the event occurs). Therefore it is best not declare anything on this property, it works without problems the same.

    Read the article

  • Testing Routes in ASP.NET MVC with MvcContrib

    - by Guilherme Cardoso
    I've decide to write about unit testing in the next weeks. If we decide to develop with Test-Driven Developement pattern, it's important to not forget the routes. This article shows how to test routes. I'm importing my routes from my RegisterRoutes method from the Global.asax of Project.Web created by default (in SetUp). I'm using ShouldMapTp() from MvcContrib: http://mvccontrib.codeplex.com/ The controller is specified in the ShouldMapTo() signature, and we use lambda expressions for the action and parameters that are passed to that controller. [SetUp] public void Setup() { Project.Web.MvcApplication.RegisterRoutes(RouteTable.Routes); } [Test] public void Should_Route_HomeController() { "~/Home" .ShouldMapTo<HomeController>(action => action.Index()); } [Test] public void Should_Route_EventsController() { "~/Events" .ShouldMapTo<EventsController>(action => action.Index()); "~/Events/View/44/Concert-DevaMatri-22-January-" .ShouldMapTo<EventosController>(action => action.Read(1, "Title")); // In this example,44 is the Id for my Event and "Concert-DevaMatri-22-January" is the title for that Event } [TearDown] public void teardown() { RouteTable.Routes.Clear(); }

    Read the article

  • AJAX Control Toolkit - Globalization (Language)

    - by Guilherme Cardoso
    For those who use AjaxToolKit controls presenting a language-dependent data (the CalendarExternder with the names of the months and weeks, for example) you can change the language to be presented in a simple way. In Web.Config let's define the primary culture as follows: < system . web > <System. Web> < globalization uiCulture = "pt-pt" culture = "pt-pt" /> <Globalization UICulture = "en-us" culture = "en-us" /> ... ...  In this example I'm using Portuguese. To finish it is necessary to change our ScriptManager. Be it the ToolScriptManager AjaxToolKit or belonging to the ScriptManager's framework. NET, the properties as a vibrant and true are the EnableScriptGlobalization EnableScriptLocalization. < cc1 : ToolkitScriptManager ID = "ToolkitScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true" > <Cc1: ToolkitScriptManager ID = "ToolkitScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true"> </ cc1 : ToolkitScriptManager > </ Cc1: ToolkitScriptManager> or < asp : ScriptManager ID = "ScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true" > <Asp: ScriptManager ID = "ScriptManager1" runat = "server" EnableScriptGlobalization = "true" EnableScriptLocalization = "true"> </ asp : ScriptManager > </ Asp: ScriptManager>   Like hus we use the controls on AjaxToolKit, always using the Portuguese language. It is important that AjaxTookKit is updated to avoid shortages or errors in translation, though I have not updated by this error in the ModalPopup the latest version, and any controls that I have used are translated correctly.

    Read the article

  • C # - a variable using the Encrypt md5

    - by Guilherme Cardoso
    When we are dealing with more sensitive data and important as a keyword, it is not appropriate at all stores them in database without encrypting for security reasons.  For this we use MD5  MD5 is an algorithm that allow us to encript an string, but doesn't leave us desencrypt it (not sure if it is already possible, but at least I know there are many databases already having a record).  The method below will return us a variable encrypted with md5. For example: md5_encriptar (pontonetpt.com ");   The result will be: 34efe85d338075834ad41803eb08c0df This way we save tthese encrypted data into a database, and then to make comparisons we often use the method to compare with the records kept. public string md5_encrypt(string md5) { System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] bs = System.Text.Encoding.UTF8.GetBytes(md5); bs = x.ComputeHash(bs); System.Text.StringBuilder s = new System.Text.StringBuilder(); foreach (byte b in bs) { s.Append(b.ToString("x2").ToLower()); } string password = s.ToString(); return password; }

    Read the article

  • Database .NET

    - by Guilherme Cardoso
    Database .NET is an awesome tool that allow us manage several database in simultaneous (SQL Server, MySQL, Oracle, etc). What lead me to install this tool was an problem that must be shared by must developers. Tools like SQL Server Management Studio consume to many resources, and if you don't have a decent computer you'll get problems in performance, and that's my case! With Database .NET we can access an SQL Server for example, and make several actions to database (crud operations, manage procedures, etc).Of course that this tool can replace the use of SQL Server Management Studio for example!  But it's really usefull if  you just need to perform small operations because it consumes many fewer resources. This tool don't need to be installed (it can be used as an portable application). One tip: if you are using SQL Server Express for example, don't forget to check the server name in Database .NET connection. In my case i've to change from GUILHERM-196634 to GUILHERM-196634\SQLExpress. Project: http://fishcodelib.com/Database.htm Download: http://fishcodelib.com/files/DatabaseNet3.zip

    Read the article

  • URL routing similar to Facebook (related to AJAX and the URL)

    - by Guilherme Cardoso
    In this article i'm gonna show you how i do when i have to update some content with AJAX and i have to change the URL. First, let's see an example to understand it better. If the user is reading a News with Id 1 and he clicked on another News with Id 2, if we update the content with AJAX the user is now reading the News Id 2 but the URL remains the same, for example: http://localhost/News/Read/1 Now let's see another example from Facebook. If i'm reading my profile and i click on Photos, Facebook updates it with AJAX and the URL switch to: http://www.facebook.com/guilhermegeek#!/guilhermegeek?sk=photos If we enter on that URL, it's mapped to: http://www.facebook.com/guilhermegeek?sk=photos The trick here is the parameters that we use after the #!. Those parameters are never sent to the server side, so we handle them on the client side (javascript).In the example of Facebook, he receives my profile name (guilhermegeek) and the action is to read photos. A few time ago i've written an article in my Portuguese blog explaining how to use an alternative to clients with javascript disabled. Like this: <a onclick="javascript:ReadNews(id);" href="#!News/Read/@id/">Title</a> When the user enter the link of that news, my function Read(); fills the News in the page. Then, i add the #!News/Read/@id/ to my URL. It's gonna stay something like this: http://localhost/News/Read/1#!News/Read/2 As i explained before, the News that the user is reading has the Id 2.The next step is to use javascript to check if the URL that the user typed has other News Id, because if we enter on the above URL our controller will get the Id 1 (everything after to the # isn't sent to the server side). $(document).ready(function () {             var h = window.location.hash;             if (h != null) {                 var parts = window.location.href.split('#!');                 if (parts.length > 1) {                     window.location.replace("http://localhost/" + parts[1]);                 }             }    }); It's pretty simple. I'm cutting everything after the #!, then i redirect the user to a new page. So, it's gonna stay:http://localhost/News/Read/2

    Read the article

  • How to disable "N" Wireless Mode RTL8192 (Thinkpad Edge 15 Core i5) in natty

    - by Gustavo Rubio
    I've seen many owners of thinkpad edges which are supossed to be linux-friendly having problems with wireless adapter. I've found several links inside askubuntu and in ubuntuforums which have a lot of work-arounds for those problems, mine seems to be wierd though. I use my laptop on both my office and at home. At home I have a router which is A/B/G and here at home the wireless connection works just fine, using a WEP key. But in work I have a B/G/N wireless router and it doesn't work, my guess is that this adapter works with N modes but somehow this is buggy in the bundled driver in natty. I've tried to disable the "N" mode in the router but that didn't work. Later I went to realtek website, downloaded their driver and compiled myself, kinda seems to work most of the time but sometimes some websites keep trying to load or load just parts of it and images start to look like their links are broken and so on, much like what you get when you were loading a page and suddenly the connection is lost. This problem, as I said, is only using the realtek driver from their website. Dmesg gives me this a lot of these: [ 5869.049454] rtl8192se_update_ratr_table: ratr_index=0 ratr_table=0x00000ff5 [ 5879.240563] DHCP pkt src port:68, dest port:67!! So I thougth I might as well switch back to the original driver which seems to work just fine on A/B/G wireless networks but not on N networks so if anybody knows how to disable that mode from within the driver please let us know :) Thanks in advance! PS: I do found a link to a similar question and it was answered but let me remind you I'm NOT using the intel version of wireless for my thinkpad but the realtek (RTL8192SvB)

    Read the article

  • Component-wise GLSL vector branching

    - by Gustavo Maciel
    I'm aware that it usually is a BAD idea to operate separately on GLSL vec's components separately. For example: //use instrinsic functions, they do the calculation on 4 components at a time. float dot = v1.x*v2.x + v1.y * v2.y + v1.z * v2.z; //NEVER float dot = dot(v1, v2); //YES //Multiply one by one is not good too, since the ALU can do the 4 components at a time too. vec3 mul = vec3(v1.x * v2.x, v1.y * v2.y, v1.z * v2.z); //NEVER vec3 mul = v1 * v2; I've been struggling thinking, are there equivalent operations for branching? For example: vec4 Overlay(vec4 v1, vec4 v2, vec4 opacity) { bvec4 less = lessThan(v1, vec4(0.5)); vec4 blend; for(int i = 0; i < 4; ++i) { if(less[i]) blend[i] = 2.0 * v1[i]*v2[i]; else blend[i] = 1.0 - 2.0 * (1.0 - v1[i])*(1.0 - v2[i]); } return v1 + (blend-v1)*opacity; } This is a Overlay operator that works component wise. I'm not sure if this is the best way to do it, since I'm afraid these for and if can be a bottleneck later. Tl;dr, Can I branch component wise? If yes, how can I optimize that Overlay function with it?

    Read the article

  • How does a one-man developer do its games' sounds?

    - by Gustavo Maciel
    Before anything, that's not a "oh, where can I find resources?" question. Well, I've been curious about one thing in the indie games industry. For the development of the game, such tasks like game design, art, sketches, code programming and etc can be easily done by just one person. You can just take up a paper and pencil and you're a game designer. You can just take software like Photoshop or Paint and you're an artist, a scanner and you're a sketcher, a compiler and you're a programmer. For sound it's different. You may tell me: Well, follow the line, take a lot of instruments and record it. But all we know that things don't work this way. I can list up some changes for us: External noises are a big problem, sound effects can't be made with instruments, it can't sound like a recorded and clipped sound. Well I can imagine how they do this in large companies, with such big studios and etc. But to summarise, my question is: What's the best way for a one-man indie to do all its sound? Does he have to synthesize everything? Record and buy some crazy program for editing sounds?

    Read the article

  • Painting with pixel shaders

    - by Gustavo Maciel
    I have an almost full understanding of how 2D Lighting works, saw this post and was tempted to try implementing this in HLSL. I planned to paint each of the layers with shaders, and then, combine them just drawing one on top of another, or just pass the 3 textures to the shader and getting a better way to combine them. Working almost as planned, but I got a little question in the matter. I'm drawing each layer this way: GraphicsDevice.SetRenderTarget(lighting); GraphicsDevice.Clear(Color.Transparent); //... Setup shader SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullNone, lightingShader); SpriteBatch.Draw(texture, fullscreen, Color.White); SpriteBatch.End(); GraphicsDevice.SetRenderTarget(darkMask); GraphicsDevice.Clear(Color.Transparent); //... Setup shader SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullNone, darkMaskShader); SpriteBatch.Draw(texture, fullscreen, Color.White); SpriteBatch.End(); Where lightingShader and darkMaskShader are shaders that, with parameters (view and proj matrices, light pos, color and range, etc) generate a texture meant to be that layer. It works fine, but I'm not sure if drawing a transparent quad on top of a transparent render target is the best way of doing it. Because I actually just need the position and params. Concluding: Can I paint a texture with shaders without having to clear it and then draw a transparent texture on top of it?

    Read the article

  • Touchpad stopped working on an Acer AspireOne D255E

    - by Gustavo
    I have a less than a year old Acer AspireOne D255E with a fresh install of Ubuntu 11.10. Everything has been working fine. Great OS and great netbook. But today the touchpad stopped working. It had been working fine. I closed the netbook and when I opened it again, a couple of hours later, I could not move the pointer with the touchpad. I can not get the pointer to move. I cleaned the touchpad surface well, just in case. Everything else is working fine. All the software updates are up-to-date. I have rebooted several times with no solution. I have attached an USB mouse and the pointer works well. What can I do to troubleshoot the problem? I have gone to the System Settings, touchpad section, and there is not much that I can do there. I would like to determine first if it is a hardware or software issue and then how to resolve it. Is there a way that I can reinstall the touchpad drivers. just in case it is a software problem? I have been using Ubuntu for nearly a year now and am very happy with it. Are there any wise Ubuntu gurus out there who can help me? Thank you for reading this note.

    Read the article

  • What command should be used to connect via SSH through squid proxy?

    - by Raul Cardoso
    I have set up a Squid HTTP Proxy (in centOS) and intended to use it also for ssh connections. Managed to configure putty (in a windows client) to use this proxy while connecting by ssh. Confirmed in the "target host" that the ssh connection was coming from Proxy server ip instead of the windows client IP. Used: targethost: 22 for ssh proxyserv: 3128 for proxy (along with proxy credentials) I'm now having problems connecting to the "target host" using Ubuntu and the same proxy server. I have tried the following: me@mycomp:~$ connect-proxy -H test@proxyserv:3128 targethost 22 Enter proxy authentication password for test@proxyserv: SSH-2.0-OpenSSH_6.2p2 Ubuntu-6 It hangs in last line, expecting some input. All attempts resulted in a "Protocol mismatch." error. Putty successfully connects to the http proxy and sends credentials, showing me ssh login right away. - How to do (with commands in Ubuntu) the same putty does? - Is there any other way than connect-proxy command to do this? Edit: Also tried the following with same result ("Protocol mismatch") me@mycomp:~$ connect-proxy -H test@proxyserv:3128 targethost 22 ssh -l myshel_login Thanks in advance Edit: Solution details (thanks to NickW pointing the right way) installed corkscrew and added to ssh_config Host targethost ProxyCommand corkscrew proxyserv 3128 %h %p /etc/ssh/proxypass created proxypass file login:password Restarted ssh and used a simple ssh command ssh mylogin@targethost (ssh password was asked as usual)

    Read the article

  • VM on Windows 7 Virtual PC cannot access host’s DVD Drive

    - by Gustavo Cavalcanti
    I have a brand new clean machine with Windows 7 Professional 64bit and I've installed the patch that adds Windows Virtual PC (Windows6.1-KB958559-x64). I then go to Windows Virtual PC, create a new Virtual Machine. As soon as go to settings and try to map the VM DVD drive to the host's DVD drive I get "File may be in use by another process or you may not have sufficient access privilege". I am an administrator in that box... What am I missing?

    Read the article

  • New VM on Windows 7 Virtual PC cannot access host's DVD Drive

    - by Gustavo Cavalcanti
    I have a brand new clean machine with Windows 7 Professional 64bit and I've installed the patch that adds Windows Virtual PC (Windows6.1-KB958559-x64). I then go to Windows Virtual PC, create a new Virtual Machine. As soon as go to settings and try to map the VM DVD drive to the host's DVD drive I get "File may be in use by another process or you may not have sufficient access privilege". I am an administrator in that box... Help please!

    Read the article

  • How to use dd to make splitted ISO images from an storage device?

    - by Gustavo Bandeira
    This is a double question, I just hope it's valid. I need to know how to use dd to make splitted ISO images from some storage device, I'm doing it through SSH: the process is slow and the risk of faling at the mid of the operation (1) is high then I need to know how to make these splitted ISO images from my storage device. (2) I'm searching for some reference on dd, it could be a book or a good website about it for when any doubt arises. 1 - I'm doing it on a ~60GB storage device, it took me a whole day to copy ~10GB from this disk. 2 - For curious people, I'm trying to recover an accidentaly deleted file from an iPod, until now I've been able to make the whole process, I just need to improve it beucase I left it copying the disk yesterday: Today it gave me an error when it was at ~10GB.

    Read the article

  • What are the "N" versions of Windows 8?

    - by Gustavo Gondim
    Microsoft just released the final Windows 8 versions for MSDN members, before its consumer release in october. Anyway, I am a MSDN member. Today I went to see my downloads page and I found a list of the new versions to be downloaded. Windows 8 Windows 8 N Windows 8 Pro Windows 8 Pro N Windows 8 Enterprise Windows 8 Enterprise N I know the difference between the versions "Windows 8", "Windows 8 Pro" and "Windows 8 Enterprise", which you easily find at wikipedia. But, I really need to know the difference between these versions and the "N" versions before download one of them.

    Read the article

  • How to enlarge a PDF document on Kindle?

    - by Gustavo
    Kindle doesn't zoom in a PDF document, so I'd like to know if there is a way to enlarge the file myself before it being displayed on the kindle screen. I've tried to convert some PDF files to the .azw kindle format, but the images weren't converted. So I have to find another way.

    Read the article

1 2 3  | Next Page >