Monthly Archives

Articles indexed in November 2013

Page 4/211 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Why isn't my other two constant buffers being updated to the shader?

    - by Paul Ske
    I posted previously before about my two dynamic buffers not being dynamically updating the constant shader. The tessellation buffer isn't working because I have to manually update the tessellation factor inside the hull shader. I believe the camera position isn't updating either because when I perform distance adaptation the far edges are more tessellated then the what's truly in front of the camera. I have all the buffers set to dynamic. Inside the render loop I have them set as: ID3D11Buffer *multiBuffers[3]; devcon->VSSetConstantBuffers(0,3,multiBuffers); ... devcon->DSSetConstantBuffers(0,3,multiBuffers); I only got that from a directX Sample. Inside the shader file I have the three cbuffer structs. cbuffer ConstantBuffer { float4x4 WorldMatrix; float4x4 viewMatrix; float4x4 projectionMatrix; float4x4 modelWorldMatrix; // the rotation matrix float3 lightvec; // the light's vector float4 lightcol; // the light's color float4 ambientcol; // the ambient light's color bool isSelected; } cbuffer cameraBuffer { float3 cameraDirection; float padding; } cbuffer TessellationBuffer { float tessellationAmount; float3 padding2; } Am I missing something or would anyone know why wouldn't my buffers update to the shader file?

    Read the article

  • Multiple buttons on screen

    - by Rajas
    I am not a game developer. I am a java developer. However I need some information and I am hoping you can help me. I want to build an app that has 3 buttons on the touch screen - 1,2 and 3. Depending on the screen input the user has to press or release button 3 but (s)he will have to keep either 1 or 2 depressed all the time. For example: Keep 1 pressed while operating button 3 or Keep 2 pressed while operating button 3. Please let me know if this is even doable. Best Regards, \|/

    Read the article

  • Radiosity using a hemisphere

    - by P. Avery
    I'm working on a radiosity processor. I'm projecting scene geometry onto a hemisphere at a high order of tessellation during a visibility pass onto a 1024x1024 render target. The problem is that the edges of certain triangles are not being rendered to the item buffer( render target )...so when I test certain edges( or pixels during pixel shader ) for visibility during a reconstruction pass, visible edges are not identified and as a result the pixel for that edge is discarded. One solution was to increase the resolution of the item buffer( up to 4096x4096 )...this helped and more edges were visible, however, this was not fullproof. How do I increase visibility? Here is a screenshot of a scene after radiosity is applied: the seams are edges along a triangle face that were not visible due to the resolution of the item buffer... fixed the problem by sampling the item buffer w/8 points:

    Read the article

  • Implementing Explosions

    - by Xkynar
    I want to add explosions to my 2D game, but im having a hard time with the architecture. Several game elements might be responsible for explosions, like, lets say, explosive barrels and bullets (and there might be chain reactions with close barrels). The only options i can come up with are: 1 - Having an array of explosions and treat them as a game element as important as any other Pros: Having a single array which is updated and drawn with all the other game element arrays makes it more organized and simple to update, and the explosive barrels at a first glance would be easy to create, simply by passing the explosion array as a pointer to each explosive barrel constructor Cons: It might be hard for the bullets to add an explosion to the vector, since bullets are shot by a Weapon class which is located in every mob, so lets say, if i create a new enemy and add it to the enemy array, that enemy will have a weapon and functions to be able to use it, and if i want the weapon (rocket launcher in this case) to have access to the explosions array to be able to add a new one, id have to pass the explosion array as a pointer to the enemy, which would then pass it to the weapon, which would pass it to the bullets (ugly chain). Another problem I can think of is a little more weird: If im checking the collisions between explosions and barrels (so i create a chain reaction) and i detect an explosion colliding with a barrel, if i add a new explosion while im iterating the explosions java will trow an exception. So this is kinda annoying, i cant iterate through the explosions and add a new explosion, i must do it in another way... The other way which isnt really well thought yet is to just add an explosive component to every element that might explode so that when it dies, it explodes or something, but i dont have good ways on implementing this theory either Honestly i dont like either the solutions so id like to know how is it usually done by actual game developers, sorry if my problem seems trivial and dumb.

    Read the article

  • Mobile application using REST web services in java to access database

    - by user1761991
    HTML5+CSS+javascript mobile app need to communicate with mysql database through REST Web services.I have a doubt in how html5 app consuming web services(Both storing and retrieving data in mysql database). Moreover, the app is not a native one. Phonegap is used to built this app to support in all OS available. The required rest web sevices ought to have JAVA in server coding part.Is there any possibility of having generalized rest web services which can able to consumed from all OS? Can anyone suggest any ideas related to this ? As i am new to mobile development unable to figure out the right and correct method to proceed. Thanks in Advance

    Read the article

  • generate random characters in c

    - by Nick
    I'm new to programming in C and have been given the task of creating a 2D array that stores random letters from A-Z using the random () function. I know how to do random numbers. nextvalue = random ( ) % 10001; but am unsure on how exactly to create a random character. I know that you can use ASCII to create a random character using the range 65 - 90 in the ASCII table. Can anyone help me come up with a solution? I would greatly appreciate it.

    Read the article

  • Segmentation fault when creating a Phonon MediaObject

    - by Luke Hansford
    I have music playing program made using PySide which uses Phonon to playback audio. I updated to MacOS X Mavericks a few days ago, which meant I needed to reinstall PySide. I'm not sure which of these actions has caused this, but now whenever I try to create a Phonon MediaObject I get a Segmentation Fault: 11 from Python. It's not just in my program, it happens when trying to create a MediaObject in Python without any other actions. I'm getting the following error message from my Mac whenever it crashes: Process: Python [13711] Path: /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 2.7.5 (2.7.5) Code Type: X86-64 (Native) Parent Process: bash [13707] Responsible: Terminal [13704] User ID: 501 Date/Time: 2013-11-01 19:47:53.164 +1000 OS Version: Mac OS X 10.9 (13A603) Report Version: 11 Anonymous UUID: C2686854-18CA-9D37-26E9-60050E3C4DA6 Sleep/Wake UUID: BB983BF6-CCE2-44D1-82A0-1C73382DFFE4 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008 VM Regions Near 0x8: --> __TEXT 00000001082e8000-00000001082e9000 [ 4K] r-x/rwx SM=COW /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 QtCore 0x000000010a1b34cb QObject::moveToThread(QThread*) + 17 1 QtDBus 0x000000010d55f98b QDBusDefaultConnection::QDBusDefaultConnection(QDBusConnection::BusType, char const*) + 171 2 QtDBus 0x000000010d55ebdf QDBusConnection::sessionBus() + 71 3 phonon 0x000000010d50228d Phonon::FactoryPrivate::FactoryPrivate() + 189 4 phonon 0x000000010d5024d5 Phonon::$_249::operator->() + 99 5 phonon 0x000000010d502991 Phonon::Factory::registerFrontendObject(Phonon::MediaNodePrivate*) + 17 6 phonon 0x000000010d50b27e Phonon::MediaNodePrivate::MediaNodePrivate(Phonon::MediaNodePrivate::CastId) + 80 7 phonon 0x000000010d50f570 Phonon::MediaObjectPrivate::MediaObjectPrivate() + 24 8 phonon 0x000000010d50be9d Phonon::MediaObject::MediaObject(QObject*) + 45 9 phonon.so 0x000000010d42f24a Sbk_Phonon_MediaObject_Init + 458 10 org.python.python 0x0000000108338707 type_call + 189 11 org.python.python 0x00000001082f74fd PyObject_Call + 101 12 org.python.python 0x00000001083714f0 PyEval_EvalFrameEx + 15525 13 org.python.python 0x0000000108373aaf fast_function + 182 14 org.python.python 0x0000000108370919 PyEval_EvalFrameEx + 12494 15 org.python.python 0x000000010836d721 PyEval_EvalCodeEx + 1638 16 org.python.python 0x000000010836d0b5 PyEval_EvalCode + 54 17 org.python.python 0x000000010838beb8 run_mod + 53 18 org.python.python 0x000000010838bf5f PyRun_FileExFlags + 137 19 org.python.python 0x000000010838baad PyRun_SimpleFileExFlags + 718 20 org.python.python 0x000000010839c58b Py_Main + 3039 21 libdyld.dylib 0x00007fff8e4fb5fd start + 1 Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff8c938662 kevent64 + 10 1 libdispatch.dylib 0x00007fff923e743d _dispatch_mgr_invoke + 239 2 libdispatch.dylib 0x00007fff923e7152 _dispatch_mgr_thread + 52 Thread 2: 0 libsystem_kernel.dylib 0x00007fff8c937e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff90bd8f08 _pthread_wqthread + 330 2 libsystem_pthread.dylib 0x00007fff90bdbfb9 start_wqthread + 13 Thread 3: 0 libsystem_kernel.dylib 0x00007fff8c937e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff90bd8f08 _pthread_wqthread + 330 2 libsystem_pthread.dylib 0x00007fff90bdbfb9 start_wqthread + 13 Thread 4: 0 libsystem_kernel.dylib 0x00007fff8c937e6a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fff90bd8f08 _pthread_wqthread + 330 2 libsystem_pthread.dylib 0x00007fff90bdbfb9 start_wqthread + 13 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x00007feba0d19700 rbx: 0x000000010d5b7098 rcx: 0x00000000002f4180 rdx: 0x000000000012c040 rdi: 0x0000000000000000 rsi: 0x00007feba0d19700 rbp: 0x00007fff57917210 rsp: 0x00007fff579171d0 r8: 0x00007feba0fd5d10 r9: 0x00007feba0ff5310 r10: 0x0000000019c04cbe r11: 0x0000000070769b38 r12: 0x00007fff57917220 r13: 0x00007feba0c07190 r14: 0x0000000000000000 r15: 0x00007feba0fe1430 rip: 0x000000010a1b34cb rfl: 0x0000000000010202 cr2: 0x0000000000000008 Logical CPU: 0 Error Code: 0x00000004 Trap Number: 14 Anyone have any ideas about what is happening?

    Read the article

  • git merge specifies wrong author

    - by dhblah
    I have a problem with latest version of git i compiled under cygwin. At first, it displays editor to enter merge message. Previously, it went sailent. And then commit author seems to be different from normal commit. When I do manual commit, author is User Name <[email protected]>, but when I do merge author name is Domain\username <[email protected]> Is there a way to make merge to specify the same auther as for manual commit? What's happening?

    Read the article

  • Nose2 multiprocess error on Windows7

    - by tt293
    I was looking into nose2 as a way to get around the restrictions of having both xunit output and multiprocessing in nose1.3. However, when always-on is set to False in the [multiprocess] section, I can only get a single process running, while when running with always-on set to True, I get the following error: ---------------------------------------------------------------------- Ran 0 tests in 0.043s OK Traceback (most recent call last): File "C:\dev\testing\Tests\PythonTests\venv\Scripts\nose2-script.py", line 8, in <module> load_entry_point('nose2==0.4.7', 'console_scripts', 'nose2')() File "C:\dev\testing\Tests\PythonTests\venv\lib\site-packages\nose2-0.4.7-py2. 7.egg\nose2\main.py", line 284, in discover return main(*args, **kwargs) File "C:\dev\testing\Tests\PythonTests\venv\lib\site-packages\nose2-0.4.7-py2. 7.egg\nose2\main.py", line 98, in __init__ super(PluggableTestProgram, self).__init__(**kw) File "C:\dev\testing\Tests\PythonTests\venv\lib\site-packages\unittest2-0.5.1- py2.7.egg\unittest2\main.py", line 98, in __init__ self.runTests() File "C:\dev\testing\Tests\PythonTests\venv\lib\site-packages\nose2-0.4.7-py2. 7.egg\nose2\main.py", line 260, in runTests self.result = runner.run(self.test) File "C:\dev\testing\Tests\PythonTests\venv\lib\site-packages\nose2-0.4.7-py2. 7.egg\nose2\runner.py", line 53, in run executor(test, result) File "C:\dev\testing\Tests\PythonTests\venv\lib\site-packages\nose2-0.4.7-py2. 7.egg\nose2\plugins\mp.py", line 60, in _runmp ready, _, _ = select.select(rdrs, [], [], self.testRunTimeout) select.error: (10038, 'An operation was attempted on something that is not a soc ket') This is running python 2.7.5 (32bit) on Windows 7 in a virtualenv with six-1.1.0, unittest2-0.5.1 and nose2-0.4.7 (I get the same behavior outside of the venv, so I don't think that is the issue here).

    Read the article

  • Linking buttion to jQuery through service

    - by Ruddy
    I have a small problem that should be very easy to overcome. For some reason I cant work this out. So the problem is I cannot get a button to link to some jquery. My set-up is as follows (showing the relevant code): Default.aspx jQuery: function getContent() { var data = { numberID: 1 }; $.jsonAspNet("ContentService.asmx", "GetContent", data, function (result) { $('#content').html(result); }); } jQuery(document).ready(function () { getContent(); } HTML: <div id="content"></div> ContentService.vb Public Function GetContent(number As Integer) As String Dim sb = New StringBuilder sb.AppendLine("<table>") sb.AppendLine("<tr>") sb.AppendLine("<td class='ui-widget-header ui-corner-all'>Number</td>") sb.AppendLine("</tr>") sb.AppendLine("<tr>") sb.AppendLine("<td>" & number & "</td>") sb.AppendLine("<td><a href='#' id='test' class='fg-button ui-state-default ui-corner-all'><img src='" & Context.Request.ApplicationPath & "/images/spacer.gif' class='ui-icon ui-icon-pencil' /></a></td>") sb.AppendLine("</tr>") sb.AppendLine("</table>") Return sb.ToString End Function So that's the basics of what I have everything works but I'm not sure how to get the button (id='test') to get linked to some jQuery. I want it to be pressed and bring up a popup. I have tried to put the jQuery on default.aspx but this doesn't seem to work unless the button is place in the HTML on that page. $('#test').unbind('click').click(function () { alert('Working'); }); I'm sure this is easy to be able to do but I have been trying for a while and cannot seem to get it to work.

    Read the article

  • AWS S3 status code 403 SignatureDoesNotMatch - Check your key and signing method

    - by Matt
    i have checked a rechecked my keys and they are correct but i keep the below Exception whenever i try to upload, can anyone shed some light on this problem? 11-01 09:21:26.331: W/System.err(13934): AmazonS3Exception: Status Code: 403, AWS Service: Amazon S3, AWS Request ID: B97CC81E13D81XXX, AWS Error Code: SignatureDoesNotMatch, AWS Error Message: The request signature we calculated does not match the signature you provided. Check your key and signing method., S3 Extended Request ID: PPieuQpqElIizNBQPc42JwC4WnBkUciCKRT5S4HSftBraeacN8y0lKfsVP9LXXXX 11-01 09:21:26.331: W/System.err(13934): at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:659) 11-01 09:21:26.331: W/System.err(13934): at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:330) 11-01 09:21:26.331: W/System.err(13934): at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:182) 11-01 09:21:26.331: W/System.err(13934): at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3038) 11-01 09:21:26.331: W/System.err(13934): at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1218) 11-01 09:21:26.331: W/System.err(13934): at com.apprssd.capsule.S3UploaderActivity$S3PutObjectTask.doInBackground(S3UploaderActivity.java:165) 11-01 09:21:26.331: W/System.err(13934): at com.apprssd.capsule.S3UploaderActivity$S3PutObjectTask.doInBackground(S3UploaderActivity.java:1) 11-01 09:21:26.331: W/System.err(13934): at android.os.AsyncTask$2.call(AsyncTask.java:287) 11-01 09:21:26.331: W/System.err(13934): at java.util.concurrent.FutureTask.run(FutureTask.java:234) 11-01 09:21:26.341: W/System.err(13934): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 11-01 09:21:26.341: W/System.err(13934): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 11-01 09:21:26.341: W/System.err(13934): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 11-01 09:21:26.341: W/System.err(13934): at java.lang.Thread.run(Thread.java:841) It happens during the below. PutObjectRequest por = new PutObjectRequest( Constants.getDataBucket(), selectedZip.toString(), selectedZip); s3Client.putObject(por);

    Read the article

  • Google Chrome Extension : Port: Could not establish connection. Receiving end does not exist

    - by tcornelis
    I have been looking for an answer for almost a week now, but having read all the stackoverflow items i can't seem to find a solution that is working for me. The error that i'm having is : Port: Could not establish connection. Receiving end does not exist. lastError:30 set lastError:30 dispatchOnDisconnect messaging:277 folder layout : img developer_icon.png js sidebar.js main.js jquery-2.0.3.js manifest.json my the manifest.json file looks something like this (it is version 2) :` "browser_action": { "default_icon": "./img/developer_icon.png" }, "content_scripts": [ { "matches": ["*://*/*"], "js": ["./js/sidebar.js"], "run_at": "document_end" } ], "background" : { "scripts" : ["./js/main.js","./js/jquery-2.0.3.js"] }, I want to handle the user clicking the extension icon so i could inject a sidebar in the existing website (because the extension i would like to develop requires that amount of space). So in main.js : chrome.browserAction.onClicked.addListener(function(tab) { chrome.tabs.getSelected(null, function(tab){ chrome.tabs.sendMessage( //Selected tab id tab.id, //Params inside a object data {callFunction: "toggleSidebar"}, //Optional callback function function(response) { console.log(response); } ); }); }); and in sidebar.js : chrome.runtime.onMessage.addListener(function(req,sender,sendResponse){ console.log("sidebar handling request"); toggleSidebar(); }); but i'm never able to see the console.log in my console because of the error. Does someone know what i did wrong? Thanks in advance!

    Read the article

  • Can I control the mouse cursor from within R?

    - by Bernd Meyer
    Is it possible, to control the mouse pointer from the R console? I have something like this in mind: move_mouse(x_pos=100,y_pos=200) # move the mouse pointer to position (100,200) mouse_left_button_down # simulate a press of the left button move_mouse(x_pos=120,y_pos=250) # move mouse to select something mose_release_left_button # release the pressed button In MATLAB, something like this is possible with the following code import java.awt.Robot; mouse = Robot; mouse.mouseMove(0, 0); mouse.mouseMove(100, 200); Is something similar possible for the keybord? E.g. simulate keybord events?

    Read the article

  • What are the responsibilities of the data layer?

    - by alimac83
    I'm working on a project where I had to add a data layer to my application. I've always thought that the data layer is purely responsible for CRUD functions ie. shouldn't really contain any logic but should simply retrieve data for the business layer to manipulate. However I'm a little confused with my project because I'm not sure whether I've structured my app correctly for this scenario. Basically I'm trying to retrieve a list of products from the database that fall within a certain pricing threshold. At the moment I have a function in my data layer that basically returns all products where price min threshold and price < max threshold. But it got me thinking that maybe this is incorrect. Should the data layer simply return a list of ALL products and then the business logic do the filtering? I'm pretty confused over whether the data layer should simply provide methods that allow the business layer to get raw data or whether it should be responsible for getting filtered data too? If anyone has an article or something explaining this in detail it'd be very helpful. Thanks

    Read the article

  • INSERT INTO temporary table from sp_executsql

    - by gotqn
    Generally, I am bulding dynamic SQL statement that is executing using sp_executsql like this: EXEC sp_executesql @TempSQLStatement I need to insert the return result row set in something (table variable or temporary table), but I am getting the following error: Msg 208, Level 16, State 0, Line 1746 Invalid object name '#TempTable'. after executing this: INSERT INTO #TempTable EXEC sp_executesql @TempSQLStatement From what I have read, I believe the issue is caused because I am not specifying the columns of the temporary table, but I am not able to do this because the return columns count varies. I have read that I can use global temporary tables, but I have done this before and wonder is there an other way to do that.

    Read the article

  • c# error for index was outside the bounds of array

    - by iliailiaey
    i have written below code but i have the error:Index was outside the bounds of the array.i cant understand its reason.how can i correct the code for preventing the error?(in the code,i want to make an array byte of size 57600 from an array byte of size 38400) int q = 0; int nbytes = 57600; byte[] gh = new byte[38400]; byte[] byte8 = new byte[nbytes]; byte[] aa = { 0xf8, 0x07, 0XE0, 0X1F }; for (int y = 0; y < nbytes-3; y += 3) { if (q < 38400-3) { byte8[y] = (byte)(gh[q] & aa[1]); byte8[y + 1] = (byte)(((gh[q] & aa[1]) << 5) | ((gh[q + 1] & aa[2]) >> 3)); byte8[y + 2] = (byte)((gh[q + 1] & aa[3]) << 3); q += 2; } }

    Read the article

  • Comparing numeric strings

    - by Kiren Siva
    From the question PHP Type-Juggling and (strict) Greater/Lesser Than Comparisons I know PHP interpret strings as numbers whenever it can. "10" < "1a" => 10 less than 1 expecting false "1a" < "2" => 1 less than 2 expecting true "10" > "2" => 10 greater than 2 expecting true But in the case of "10" < "1a" php returns true. I am not understanding the concept please help me to clarify it. Edit: But when I add "10" + "1a" it returns 11 that means php interprets "10" as 10 and "1a" as 1. Is that correct?

    Read the article

  • How to run a program on a specific remote computer

    - by lucc
    Hi, I have got this working line of code I would like to run via VBScript a share program on a remote computer in a domain environment. The first part is ok where it is asking me to enter a computer name, but the problem is in the second part. I don't know how to run the program on the remote computer that I've entered in the first part. computer = inputbox ("What computer do you wish to check? (Press Enter if this computer)","Computer") set WMI = GetObject("WinMgmts://" & computer) If computer="" then computer = "this computer" Dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) objShell.Run("""\\compname\Share\progr.exe""") Set objShell = nothing After running this script, it runs the program on my computer, not on the remote computer. I want to run the program on a specific computer that I have entered from keyboard. Please help. Thank you.

    Read the article

  • Custom Navigation Bar (html/css) for a website

    - by MikeStardust
    I am making a website and though of a cool navigation bar that is suppose to look like this: And using css code: #navigation ul { list-style: none; text-align: center; } #navigation li { display: inline; } #navigation li a { text-indent: -5000px; display: inline-block; height: 40px; } #navigation li a.profile { width: 240px; background: url("http://i.imgur.com/pphPRAA.png"); text-decoration: none; } #navigation li a.profile:hover { background: url("http://i.imgur.com/bDwcbXd.png"); background-position: -240px; text-decoration: none; } #navigation li a.profile:current { background: url("http://i.imgur.com/bDwcbXd.png"); background-position: -240px; background-repeat: no-repeat; text-decoration: none; } I managed to make it look like this: http://pokemasters.freeiz.com/bare.html I just ran out of ideas.... i got the images that i made seperatly, a navbar: & buttons: I'm looking for a full width navbar that adjusts itself to different screens, is located at the bottom of the screen, red buttons while active or hovered and white buttons while normal, with that pokeball line right on top of it and overlaying the buttons Can someone point me in the right direction please?? thank you:)

    Read the article

  • passport-linkedin-oauth2 not returning email address

    - by biborno
    here is my console.log(profile); { provider: 'linkedin', id: 'LJitOAshpU', displayName: 'Monist BD', name: { familyName: 'BD', givenName: 'Monist' }, emails: [ { value: undefined } ], _raw: '{\n "firstName": "Monist",\n "formattedName": "Monist BD",\n "id": " LJitOAshpU",\n "lastName": "BD"\n}', _json: { firstName: 'Monist', formattedName: 'Monist BD', id: 'LJitOAshpU', lastName: 'BD' } } here is my routing code: app.get('/auth/linkedin',passport.authenticate('linkedin', { scope: ['r_emailaddress', 'r_basicprofile', 'rw_nus'],state: 'DCEEFWF45453sdffef424' })); app.get('/auth/linkedin/callback',passport.authenticate('linkedin', { failureRedirect: '/' }),users.authCallback); here is passport.js config: passport.use(new LinkedInStrategy({ clientID: config.linkedIn.clientID, clientSecret: config.linkedIn.clientSecret, callbackURL: config.linkedIn.callbackURL, profileFields: ['id', 'first-name', 'last-name', 'email-address','public-profile-url'], passReqToCallback: true }, function(req,token, refreshToken, profile, done) { console.log(profile); })); why i m getting undefined in email values? :( it worked when i used passport-linkedin

    Read the article

  • Python error with IndentationError: unindent does not match any outer indentation level

    - by Vikrant Cornelio
    from tweepy import Stream from tweepy import OAuthHandler from tweepy.streaming import StreamListener ckey='W1VPPrau42ENAWP1EnDGpQ' csecret='qxtY2rYNN0QT0Ndl1L4PJhHcHuWRJWlEuVnHFDRSE' atoken='1577208120-B8vGWIquxbmscb9xdu5AUzENv09kGAJUCddJXAO' asecret='tc9Or4XoOugeLPhwmCLwR4XK8oUXQHqnl10VnQpTBzdNR' class listener(StreamListener): def on_data(self,data): print data return True def on_error(self,status): print status auth=OAuthHandler(ckey,csecret) auth.set_access_token(atoken,asecret) twitterStream=Stream(auth,listener()) twitterStream.filter(track=["car"]) I typed this in my Python shell i got an error...the error was IndentationError: unindent does not match any outer indentation level..Please help me!!!!!!!!!!!

    Read the article

  • AnkhSVN - How to remove old URLs from list of URLs in the "Open from Subversion" dialog box

    - by user2942597
    I work for a small company and am the sole developer using AnkhSVN to version my code. For the server side I am using VisualSVN v2.5.8. The server is installed on my own machine (on a different drive). I have a few repositories that I created about two years ago that have been working fine. We recently completed an Active Directory Domain Rename (that's another story) so the FQDN of my machine changed so the domain portion is no longer the same as what it was when the server portion was installed. I managed to get AnkhSVN to connect to the repositories so everything is working again but the URL list that comes up on the "Open from Subversion" dialog box still has all the old URLs. How can I remove them? I've searched everywhere I can think of looking for this list but can't seem to find it anywhere. Any suggestions would be greatly appreciated. Chuck R.

    Read the article

  • Android Studio Could not call IncrementalTask.taskAction() on task ':project:dexDebug'

    - by akenawell85x
    I recently decided to switch from Eclipse to Android Studio. I imported a project I was working on and am now getting this error when I try to run the project. Gradle: Execution failed for task ':project:dexDebug'. > Could not call IncrementalTask.taskAction() on task ':project:dexDebug' I've been cruising this site for 2 days now and trying different suggestions to no avail. I did run gradlew compileDebug --stacktrace and this is what I got: C:\Users\adam\AndroidStudioProjects\projectProject>gradlew compileDebug --stacktrace Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0 :project:preBuild UP-TO-DATE :project:preDebugBuild UP-TO-DATE :project:preReleaseBuild UP-TO-DATE :project:prepareComAndroidSupportAppcompatV71800Library UP-TO-DATE :project:prepareComGoogleAndroidGmsPlayServices3225Library UP-TO-DATE :project:prepareDebugDependencies :project:compileDebugAidl UP-TO-DATE :project:compileDebugRenderscript UP-TO-DATE :project:generateDebugBuildConfig UP-TO-DATE :project:mergeDebugAssets UP-TO-DATE :project:mergeDebugResources UP-TO-DATE :project:processDebugManifest UP-TO-DATE :project:processDebugResources UP-TO-DATE :project:generateDebugSources UP-TO-DATE :project:compileDebug UP-TO-DATE BUILD SUCCESSFUL Total time: 10.459 secs However I am still getting that error when I try to actually run the project. Here is my build.gradle (i do have a 'libs' folder in my project with all the jars for a google maps/places app): buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 18 buildToolsVersion "18.1.1" defaultConfig { minSdkVersion 8 targetSdkVersion 18 } } dependencies { compile fileTree(dir: 'libs') compile 'com.google.android.gms:play-services:3.2.25' compile 'com.android.support:support-v4:18.0.0' compile 'com.android.support:appcompat-v7:+' } and my settings.gradle: include ':project', ':project:libs:android-support-v4', ':project:libs:google-api-client-1.10.3-beta', ':project:libs:google-api-client-android2-1.10.3-beta', ':project:libs:google-http-client-1.10.3-beta', ':project:libs:google-http-client-android2-1.10.3-beta', ':project:libs:google-oauth-client-1.10.1-beta', ':project:libs:gson-2.1', ':project:libs:guava-11.0.1', ':project:libs:jackson-core-asl-1.9.4', ':project:libs:jsr305-1.3.9', ':project:libs:protobuf-java-2.2.0', ':project:libs:GoogleAdMobAdsSdk-6.4.1' As I said, I've tried pretty much everything I have read on here about this error and am having no luck. Any help would be greatly appreciated.

    Read the article

  • Stored procedure or function expects parameter which is not supplied

    - by user2920046
    I am trying to insert data into a SQL Server database by calling a stored procedure, but I am getting the error Procedure or function 'SHOWuser' expects parameter '@userID', which was not supplied. My stored procedure is called "SHOWuser". I have checked it thoroughly and no parameters is missing. My code is: public void SHOWuser(string userName, string password, string emailAddress, List preferences) { SqlConnection dbcon = new SqlConnection(conn); try { SqlCommand cmd = new SqlCommand(); cmd.Connection = dbcon; cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "SHOWuser"; cmd.Parameters.AddWithValue("@userName", userName); cmd.Parameters.AddWithValue("@password", password); cmd.Parameters.AddWithValue("@emailAddress", emailAddress); dbcon.Open(); int i = Convert.ToInt32(cmd.ExecuteScalar()); cmd.Parameters.Clear(); cmd.CommandText = "tbl_pref"; foreach (int preference in preferences) { cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@userID", Convert.ToInt32(i)); cmd.Parameters.AddWithValue("@preferenceID", Convert.ToInt32(preference)); cmd.ExecuteNonQuery(); } } catch (Exception) { throw; } finally { dbcon.Close(); } and the stored procedure is: ALTER PROCEDURE [dbo].[SHOWuser] -- Add the parameters for the stored procedure here ( @userName varchar(50), @password nvarchar(50), @emailAddress nvarchar(50) ) AS BEGIN INSERT INTO tbl_user(userName,password,emailAddress) values(@userName,@password,@emailAddress) select tbl_user.userID,tbl_user.userName,tbl_user.password,tbl_user.emailAddress, stuff((select ',' + preferenceName from tbl_pref_master inner join tbl_preferences on tbl_pref_master.preferenceID = tbl_preferences.preferenceID where tbl_preferences.userID=tbl_user.userID FOR XML PATH ('')),1,1,' ' ) AS Preferences from tbl_user SELECT SCOPE_IDENTITY(); END Pls help, Thankx in advance...

    Read the article

  • Sprite not moving when using a function from another class SFML c++

    - by user2892932
    I have a Game.cpp, and I am calling a update function in my Player class. In my player update Function I have it to check for keyboard input, and it seems to work, but whenever I try to call the .move() function, it seems to not work. I get no errors either. I am new to sfml, and decent with c++. Help is appreciated! #include "Player.h" Player::Player(void): vel(0), maxvel(100) { Load("Assets/sss.png",true); } void Player::Update(sf::Sprite& p) { if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) { moveObject(-3,0, p); } if(sf::Keyboard::isKeyPressed(sf::Keyboard::D)) { moveObject(-3,0, p); } } Player::~Player(void) { } This is the GameObject cpp #include "GameObject.h" #include <iostream> GameObject::GameObject(void) { isLoaded = false; } void GameObject::Load(std::string flname, bool isPlayer) { if(!tex.loadFromFile(flname)) { EXIT_FAILURE; } else { if(isPlayer) { if(!tex.loadFromFile(flname, sf::IntRect(0,0,33,33))) { EXIT_FAILURE; } else { std::cout << "Loading image" << "\n"; filename = flname; spr.setTexture(tex); isLoaded = true; } } else { std::cout << "Loading image" << "\n"; filename = flname; spr.setTexture(tex); isLoaded = true; } } } void GameObject::Draw(sf::RenderWindow & window) { if(isLoaded) { window.draw(spr); window.display(); std::cout << "Sprite drew" << "\n"; } } void GameObject::setPos(float x, float y) { if(isLoaded) { spr.setPosition(x,y); } } sf::Vector2f GameObject::GetObjPos() { return spr.getPosition(); } sf::Sprite& GameObject::getSprite() { return spr; } void GameObject::moveObject(float x, float y, sf::Sprite& sp) { sp.move(x, y); } GameObject::~GameObject(void) { }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >