Daily Archives

Articles indexed Thursday August 21 2014

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

  • Reset Windows Password with Ubuntu Live CD

    - by snix
    A friend brought me his PC with Windows Vista to reset the user password because he didn't use it for a long while and forgot his password. So I found a tutorial on how to reset the password by using a Ubuntu Live CD and the software chntpw. After I installed this software I mounted the SYSTEM partition by opening it with the file explorer. It is now available at /media/SYSTEM/ The tutorial says I have to open the file /windows/system32/config/sam with chntpw and reset the password with chntpw -u USERNAME sam After I did this it didn't show me any errors. So I unmounted the partition and rebooted the PC with the installed Windows Vista. It is still locked with the old password. Did I do any mistakes or is there an other way to reset the password?

    Read the article

  • Flickering/Flashing screen problem related to keyboard

    - by LeandroCR
    This will seems quite bizarre but that's a huge problem for me, I'm facing it for a long time since Ubuntu 12.04. My Ubuntu/Linux Mint/Debian (Unity/Gnome) always starts flickering after using the computer for a while, I always thought this had something to do with the video board. I have an Vostro 3550 (Radeon 6xxx/Intel Onboard). First I realized that when I was navigating trough an website, when i selected with the mouse a combo, the combo closed it self automatically then the screen starts flickering. The i realized when i was trying to make the login in the terminal (crtl + alt + f1) a strange character appears, like: ^@ repeatedly. When i keep CRTL pressed the system never flickers! I have absolutely no problem using Windows. What can i do? There is no such thing as Keyboard driver on Dell Support. I would love to use Ubuntu only, but this is very annoying. Problem happens on Ubuntu 12.04, .10 and 13.04 Linux Mint 15 (Cinnamon) Debian Live with Gnome

    Read the article

  • Downgrade a bunch of packages

    - by Manuel
    Maybe you have installed packages from a PPA or an external source (e.g. downloaded a .deb for a package that is available through the Ubuntu repos.). Then you decide to drop these upgraded versions in favour to the official repositories.First step is to remove the entries of the sources.list. Is there a way to downgrade all to the highest available version? I know you can install specific versions with apt-get install [package]=[version] But can you downgrade all?

    Read the article

  • Preinstalled Windows 8 Not showing up on Grub 2, Ubuntu 12.10

    - by ise
    http://paste.ubuntu.com/1522276/ Hi There, I've scoured everywhere & I'm still all very confused. Since I'm a total noob, I don't really want to touch too many files... I have an Acer M5 with Windows 8 preinstalled. I installed Ubuntu 12.10 in secure boot, but Grub does not recognize my Windows 8. I tried boot-repair, to no avail. Here are my specs: http://paste.ubuntu.com/1522276/ Please help?

    Read the article

  • Ubuntu openGL issues

    - by Dank101
    my OpenGL doesn't work at all i get Xlib: extension "GLX" missing on display ":0". lspci output 00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:1246] (rev a1) (prog-if 00 [VGA controller]) dmesg | grep -i nvid [ 9.469068] nvidia: module license 'NVIDIA' taints kernel. [ 9.538786] nvidia 0000:01:00.0: power state changed by ACPI to D0 [ 9.538792] nvidia 0000:01:00.0: power state changed by ACPI to D0 [ 9.538796] nvidia 0000:01:00.0: enabling device (0006 -> 0007) [ 9.538803] nvidia 0000:01:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16 [ 9.538809] nvidia 0000:01:00.0: setting latency timer to 64 [ 9.538942] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 304.48 Sun Sep 9 [10300.955799] nvidia 0000:01:00.0: restoring config space at offset 0xf (was 0x100, writing 0x10b) [10300.955803] nvidia 0000:01:00.0: restoring config space at offset 0xc (was 0x0, writing 0xfff80000) [10300.955807] nvidia 0000:01:00.0: restoring config space at offset 0x9 (was 0x1, writing 0x4001) [10300.955811] nvidia 0000:01:00.0: restoring config space at offset 0x7 (was 0xc, writing 0xd000000c) [10300.955814] nvidia 0000:01:00.0: restoring config space at offset 0x5 (was 0xc, writing 0xc000000c) [10300.955817] nvidia 0000:01:00.0: restoring config space at offset 0x4 (was 0x0, writing 0xf0000000) [10300.955820] nvidia 0000:01:00.0: restoring config space at offset 0x3 (was 0x800000, writing 0x10) [10300.955823] nvidia 0000:01:00.0: restoring config space at offset 0x1 (was 0x100006, writing 0x100007) my computer is a dell XPS l702x

    Read the article

  • What does it take to successfully run a URL shortener service [on hold]

    - by MxyL
    What are the costs (technology wise) for running a URL shortener service such as bit.ly or anonym.to? For example, if I decided to use an inexpensive shared hosting with "unlimited" bandwidth, would that be feasible? Or would I need a dedicated hosting? I found this question: I want to run a URL shortener for my own usage, what do I need to do?, which makes it easy to set it up, but I'm not too clear what kind of things I need to consider.

    Read the article

  • What is a quick and easy way to make a minimal news blog that pulls rss feeds? I have 2 days [on hold]

    - by user44188
    My boss wants me to make a website that pulls news from various rss feeds from all over the web. I need to pull something together, that looks pro, quick! I started by going to themeforest and looked around forever, but nothing really looked right. I need something mostly built like this already that I can just alter into our site. I can do most cms, photoshop, some code, I used to do it like this freelance years ago, but it's not really my job now. It just sort of came up suddenly, so I wanna pull through. This is a good example of the overall structure I had in mind, but it just isn't clean enough. All of the news feeds will essentially be about the same criteria, but will pertain to different geographic areas. It would be a huge plus if I could segregate the news visually in some clever way based on geography. (Like a map?) I'm definitely open to all suggestions. I have to get this done by friday!

    Read the article

  • http to https upgrade -- SEO troubles

    - by SLIM
    I upgraded my site so that all pages have gone from using http to https. I didn't consider that Google treats https pages differently than http. I re-created my sitemap to so that all links now reflect the new https and let it be for a few days. (Whoops!) Google is now re-indexing all https pages. I have about 19k pages on the site, and Google has already indexed about 8k of the new https. The problem is that Google sees all of these as brand new pages when many of them have a long http history. Of course most of you will recognize the problem, I didn't set up a 301 from the old http to the new https. Is it too late to do this? Should I switch my sitemap back to http and then 301 to the new https? Or should I leave the sitemap as is, and setup 301 redirects anyway.. I'm not even sure if Google is trying to reach the http site anymore. Currently the site is doing 303 redirects (from http to https), although I haven't figured out why yet. Thanks for any suggestions you can offer.

    Read the article

  • jQuery Mobile Frame Forwarding [on hold]

    - by Nizam
    I have a site that does a standard forward to another site [301 Redirect]. In the redirected site, I detect if the device is a mobile using the following code: if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) { window.location.replace("Mobile/Login/Login.aspx") } else { window.location.replace("Apps/Login/Login.aspx") } It works and jQuery mobile makes the site fits device very well. To do so, I use the following code in ASPX page: <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> The problem is that I am wanting to frame forward - instead of standard forward - (there are a lot of advantages), but the site is not fitted for the device anymore, and even the icon I have chosen for my page is not well defined anymore. The code I use to set the icon of page is: <link rel="apple-touch-icon" href="../../Apps/Imagens/Icone.png" /> My site is hosted by Mochahost My question is: Is there anything I could do to make it works?

    Read the article

  • Multi Pass Blend

    - by Kirk Patrick
    I am seeking the simplest working example of a two pass HLSL pixel shader. It can do anything really, but the main idea is to perform "ping ponging" to take the output of the first pass and then send it for the second pass. In my example I want to draw to the R channel and then draw to the G channel and produce a simple Venn Diagram in the shader, but need to detect overlap. I can currently detect one or the other but not overlap. There are a red and green circle overlapping, and I want to put a dynamic texture map in the overlap region. I can currently put it in either or. Below is how it looks in the shader. -------------------------------- Texture2D shaderTexture; SamplerState SampleType; ////////////// // TYPEDEFS // ////////////// struct PixelInputType { float4 position : SV_POSITION; float2 tex0 : TEXCOORD0; float2 tex1 : TEXCOORD1; float4 color : COLOR; }; //////////////////////////////////////////////////////////////////////////////// // Pixel Shader //////////////////////////////////////////////////////////////////////////////// float4 main(PixelInputType input) : SV_TARGET { float4 textureColor0; float4 textureColor1; // Sample the pixel color from the texture using the sampler at this texture coordinate location. textureColor0 = shaderTexture.Sample(SampleType, input.tex0); textureColor1 = shaderTexture.Sample(SampleType, input.tex1); if (input.color[0]==1.0f && input.color[1]==1.0f) // Requires multi-pass textureColor0 = textureColor1; return textureColor0; } Here is the calling code (that needs to be modified) m_d3dContext->IASetVertexBuffers(0, 2, vbs, strides, offsets); m_d3dContext->IASetIndexBuffer(m_indexBuffer.Get(), DXGI_FORMAT_R32_UINT,0); m_d3dContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); m_d3dContext->IASetInputLayout(m_inputLayout.Get()); m_d3dContext->VSSetShader(m_vertexShader.Get(), nullptr, 0); m_d3dContext->VSSetConstantBuffers(0, 1, m_constantBuffer.GetAddressOf()); m_d3dContext->PSSetShader(m_pixelShader.Get(), nullptr, 0); m_d3dContext->PSSetShaderResources(0, 1, m_SRV.GetAddressOf()); m_d3dContext->PSSetSamplers(0, 1, m_QuadsTexSamplerState.GetAddressOf());

    Read the article

  • Algorithm allowing a good waypoint path following?

    - by Thierry Savard Saucier
    I'm more looking into how should I implement this, either a tutorial or even the name of the concept I'm missing. I'm pretty sure some basic pathfinding algorithm could help me here, but I dont know which one ... I have a worldmap, with different cities on it. The player can choose a city from a menu, or click on an available cities on the world map, and the toon should walk over there. But I want him to follow a predefine path. Lets say our hero is on the city 1. He clicks on city 4. I want him to follow the path to city 2 and from there to city 4. I was handling this easily with arrow movement (left right top bottom) since its a single check. Now I'm not sure how I should do this. Should I loop threw each possible path and check which one leads me to D the fastest ... and if I do how do I avoid running in circle forever with cities 1-5-2 ?

    Read the article

  • Keep basic game physics separate from basic game object? [on hold]

    - by metamorphosis
    If anybody has dealt with a similar situation I'd be interested in your experience/wisdom, I'm developing a 2D game library in C++, I have game objects which have very basic physics, they also have movement classes attached to differing states, for example, a different movement type based on whether the character is jumping, on ice, whatever. In terms of storing velocity and acceleration impulses, are they best held by the object? Or by the associated movement class? The reason I ask is that I can see advantages to both approaches- if you store physics data in the movement class, you have to pass physics information between class instances when a state change occurs (ie. impulses, gravity etc) but the class has total control over whether those physics are updated or not. An obvious example of how this would be useful was if an object was affected by something which caused it to ignore gravity, or something like that. on the other hand if you store the physics data in the object class, it feels more logical, you don't have to go around passing physics impulses and gravity etc, however the control that the movement class has over the object's physics becomes more convoluted. Basically the difference is between: object->physics stacks (acceleration impulses etc) ->physics functions ->movement type <-movement type makes physics function calls through object and object->movement type->physics stacks ->physics functions ->object forwards external physics calls onto movement type ->object transfers physics stacks between movement types when state change occurs Are there best practices here?

    Read the article

  • Changing direction after collision

    - by Balint
    In the first tutorial for GameMaker (catch the clown), I want to set the direction of the clown after the collision with the wall. I want to do it by pressing the wall object with the mouse (before the collision, to set the angle parameter). For example by pressing only once the wall object it would change the clown's direction after collision by 45 degrees, twice by 90 degrees, and so on. How can I do that?

    Read the article

  • Unity - Mecanim & Rigidbody on Third Person Controller - Gravity bug?

    - by Celtc
    I'm working on a third person controller which uses physX to interact with the other objects (using the Rigidbody component) and Mecanim to animate the character. All the animations used are baked to Y, and the movement on this axis is controlled by the gravity applied by the rigidbody component. The configuration of the falling animation: And the character components configuration: Since the falling animation doesn't have root motion on XZ, I move the character on XZ by code. Like this: // On the Ground if (IsGrounded()) { GroundedMovementMgm(); // Stores the velocity velocityPreFalling = rigidbody.velocity; } // Mid-Air else { // Continue the pre falling velocity rigidbody.velocity = new Vector3(velocityPreFalling.x, rigidbody.velocity.y, velocityPreFalling.z); } The problem is that when the chracter starts falling and hit against a wall in mid air, it gets stuck to the wall. Here are some pics which explains the problems: Hope someone can help me. Thanks and sory for my bad english! PD.: I was asked for the IsGrounded() function, so I'm adding it: void OnCollisionEnter(Collision collision) { if (!grounded) TrackGrounded(collision); } void OnCollisionStay(Collision collision) { TrackGrounded(collision); } void OnCollisionExit() { grounded = false; } public bool IsGrounded() { return grounded; } private void TrackGrounded(Collision collision) { var maxHeight = capCollider.bounds.min.y + capCollider.radius * .9f; foreach (var contact in collision.contacts) { if (contact.point.y < maxHeight && Vector3.Angle(contact.normal, Vector3.up) < maxSlopeAngle) { grounded = true; break; } } } I'll also add a LINK to download the project if someone wants it.

    Read the article

  • How to blend multiple normal maps?

    - by János Turánszki
    I want to achieve a distortion effect which distorts the full screen. For that I spawn a couple of images with normal maps. I render their normal map part on some camera facing quads onto a rendertarget which is cleared with the color (127,127,255,255). This color means that there is no distortion whatsoever. Then I want to render some images like this one onto it: If I draw one somewhere on the screen, then it looks correct because it blends in seamlessly with the background (which is the same color that appears on the edges of this image). If I draw another one on top of it then it will no longer be a seamless transition. For this I created a blendstate in directX 11 that keeps the maximum of two colors, so it is now a seamless transition, but this way, the colors lower than 127 (0.5f normalized) will not contribute. I am not making a simulation and the effect looks quite convincing and nice for a game, but in my spare time I am thinking how I could achieve a nicer or a more correct effect with a blend state, maybe averaging the colors somehow? I I did it with a shader, I would add the colors and then I would normalize them, but I need to combine arbitrary number of images onto a rendertarget. This is my blend state now which blends them seamlessly but not correctly: D3D11_BLEND_DESC bd; bd.RenderTarget[0].BlendEnable=true; bd.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA; bd.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA; bd.RenderTarget[0].BlendOp = D3D11_BLEND_OP_MAX; bd.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE; bd.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO; bd.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_MAX; bd.RenderTarget[0].RenderTargetWriteMask = 0x0f; Is there any way of improving upon this? (PS. I considered rendering each one with a separate shader incementally on top of each other but that would consume a lot of render targets which is unacceptable)

    Read the article

  • Render 2 images that uses different shaders

    - by Code Vader
    Based on the giawa/nehe tutorials, how can I render 2 images with different shaders. I'm pretty new to OpenGl and shaders so I'm not completely sure whats happening in my code, but I think the shaders that is called last overwrites the first one. private static void OnRenderFrame() { // calculate how much time has elapsed since the last frame watch.Stop(); float deltaTime = (float)watch.ElapsedTicks / System.Diagnostics.Stopwatch.Frequency; watch.Restart(); // use the deltaTime to adjust the angle of the cube angle += deltaTime; // set up the OpenGL viewport and clear both the color and depth bits Gl.Viewport(0, 0, width, height); Gl.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); // use our shader program and bind the crate texture Gl.UseProgram(program); //<<<<<<<<<<<< TOP PYRAMID // set the transformation of the top_pyramid program["model_matrix"].SetValue(Matrix4.CreateRotationY(angle * rotate_cube)); program["enable_lighting"].SetValue(lighting); // bind the vertex positions, UV coordinates and element array Gl.BindBufferToShaderAttribute(top_pyramid, program, "vertexPosition"); Gl.BindBufferToShaderAttribute(top_pyramidNormals, program, "vertexNormal"); Gl.BindBufferToShaderAttribute(top_pyramidUV, program, "vertexUV"); Gl.BindBuffer(top_pyramidTrianlges); // draw the textured top_pyramid Gl.DrawElements(BeginMode.Triangles, top_pyramidTrianlges.Count, DrawElementsType.UnsignedInt, IntPtr.Zero); //<<<<<<<<<< CUBE // set the transformation of the cube program["model_matrix"].SetValue(Matrix4.CreateRotationY(angle * rotate_cube)); program["enable_lighting"].SetValue(lighting); // bind the vertex positions, UV coordinates and element array Gl.BindBufferToShaderAttribute(cube, program, "vertexPosition"); Gl.BindBufferToShaderAttribute(cubeNormals, program, "vertexNormal"); Gl.BindBufferToShaderAttribute(cubeUV, program, "vertexUV"); Gl.BindBuffer(cubeQuads); // draw the textured cube Gl.DrawElements(BeginMode.Quads, cubeQuads.Count, DrawElementsType.UnsignedInt, IntPtr.Zero); //<<<<<<<<<<<< BOTTOM PYRAMID // set the transformation of the bottom_pyramid program["model_matrix"].SetValue(Matrix4.CreateRotationY(angle * rotate_cube)); program["enable_lighting"].SetValue(lighting); // bind the vertex positions, UV coordinates and element array Gl.BindBufferToShaderAttribute(bottom_pyramid, program, "vertexPosition"); Gl.BindBufferToShaderAttribute(bottom_pyramidNormals, program, "vertexNormal"); Gl.BindBufferToShaderAttribute(bottom_pyramidUV, program, "vertexUV"); Gl.BindBuffer(bottom_pyramidTrianlges); // draw the textured bottom_pyramid Gl.DrawElements(BeginMode.Triangles, bottom_pyramidTrianlges.Count, DrawElementsType.UnsignedInt, IntPtr.Zero); //<<<<<<<<<<<<< STAR Gl.Disable(EnableCap.DepthTest); Gl.Enable(EnableCap.Blend); Gl.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.One); Gl.BindTexture(starTexture); //calculate the camera position using some fancy polar co-ordinates Vector3 position = 20 * new Vector3(Math.Cos(phi) * Math.Sin(theta), Math.Cos(theta), Math.Sin(phi) * Math.Sin(theta)); Vector3 upVector = ((theta % (Math.PI * 2)) > Math.PI) ? Vector3.Up : Vector3.Down; program_2["view_matrix"].SetValue(Matrix4.LookAt(position, Vector3.Zero, upVector)); // make sure the shader program and texture are being used Gl.UseProgram(program_2); // loop through the stars, drawing each one for (int i = 0; i < stars.Count; i++) { // set the position and color of this star program_2["model_matrix"].SetValue(Matrix4.CreateTranslation(new Vector3(stars[i].dist, 0, 0)) * Matrix4.CreateRotationZ(stars[i].angle)); program_2["color"].SetValue(stars[i].color); Gl.BindBufferToShaderAttribute(star, program_2, "vertexPosition"); Gl.BindBufferToShaderAttribute(starUV, program_2, "vertexUV"); Gl.BindBuffer(starQuads); Gl.DrawElements(BeginMode.Quads, starQuads.Count, DrawElementsType.UnsignedInt, IntPtr.Zero); // update the position of the star stars[i].angle += (float)i / stars.Count * deltaTime * 2 * rotate_stars; stars[i].dist -= 0.2f * deltaTime * rotate_stars; // if we've reached the center then move this star outwards and give it a new color if (stars[i].dist < 0f) { stars[i].dist += 5f; stars[i].color = new Vector3(generator.NextDouble(), generator.NextDouble(), generator.NextDouble()); } } Glut.glutSwapBuffers(); } The same goes for the textures, whichever one I mention last gets applied to both object?

    Read the article

  • DotNetNuke adds wrong module to page

    - by Dr Tom
    I've deployed DotNetNuke 07.03.02 to Azure using Azure's own wizard - worked fine. Been using DNN for years on personal server without issues. However, when I try to add a module to a page (i.e regular editing) DNN adds the wrong module to the page; seemingly FirstOrDefault from the list of installed modules. I.E, I want to add the "HTML" module (or any other) to a page but instead I get the "Banners" module. If I then uninstall the the Banners module it now adds the "Modules list" module. See below example, where I'm editing the "About" page of my site and have tried to add the HTML module. I hope anyone with insight into DNN (on Azure) can provide info. I am a .Net developer, but have so far had no reason to dig into DNN's inner workings.

    Read the article

  • Changing the color of dot depending from value on Morris js graph

    - by Michal Lipa
    Im rendering graph by morris js. Im using data from mysql database by JSON. Everything works fine, but I would like to add one more feature to the graph. (change dot color if there is something in buy action). My JSON: [{"longdate":"2014-08-20 18:20:01","price":"1620","action":"buy"},{"longdate":"2014-08-20 18:40:01","price":"1640","action":""},{"longdate":"2014-08-20 19:00:01","price":"1620","action":""}] So I would like to change dot color for values with buy action. My code for graph: $.getJSON('results.json', function(day_data) { Morris.Line({ element: 'graph', data: day_data, xkey: 'longdate', ykeys: ['price'], labels: ['Cena'], lineColors: lineColor, pointSize: 0, hoverCallback: function(index, options, content) { var date = "<b><font color='black'>Data: "+day_data[index]['longdate']+"</font></b><br>"; var param1 = "<font color='"+lineColor[0]+"'>Cena - "+day_data[index]['price']+"</font><br>"; return date+param1; }, xLabelFormat : function (x) { return changeDateFormat(x); } /*My TRIAL if(action == 'buy'){ pointSize: 4, lineColors: green, } */ }); }); So my code doesnt work, how can I make this working?

    Read the article

  • Create folder and insert file in Google Drive

    - by web_student
    I am trying to create a new folder in Drive and upload one (or more) files to that created folder. I use the code below, but the result is that both the folder and the file are placed in the root of my Drive. $client->setAccessToken($_SESSION['accessToken']); //create folder $folder_mime = "application/vnd.google-apps.folder"; $folder_name = 'New Folder'; $service = new Google_DriveService($client); $folder = new Google_DriveFile(); $folder->setTitle($folder_name); $folder->setMimeType($folder_mime); $service->files->insert($folder); //upload file $file_name = $_FILES["uploadFile"]["name"]; $file_mime = $_FILES["uploadFile"]["type"]; $file_path = $_FILES["uploadFile"]["tmp_name"]; $service = new Google_DriveService($client); $file = new Google_DriveFile(); $file->setParents(array($folder_name)); $file->setTitle($file_name); $file->setDescription('This is a '.$file_mime.' document'); $file->setMimeType($file_mime); $service->files->insert( $file, array( 'data' => file_get_contents($file_path) ) );

    Read the article

  • PDFBox Pagebreak strange Nullpointer exception

    - by schneiti
    I currently try printing out text on multiple pages. For this, I count the number of rows and when they reach a fixed amount a method called pagebreakis executed. After the first pagebreak, when I try setting a font using contentstream.setFont(PDType1Font.HELVETICA, 12); it yields the following errormessage occuring at the described setFont-row. java.lang.NullPointerException at org.apache.pdfbox.pdmodel.edit.PDPageContentStream.setFont(PDPageContentStream.java:321) at com.xy.deu.xy.abc.db.schemavergleich.PDFDocumenter.drawBGCS(PDFDocumenter.java:781) at com.xy.deu.xy.abc.db.schemavergleich.PDFDocumenter.createPDFDocumentation(PDFDocumenter.java:205) at com.xy.deu.xy.abc.db.schemavergleich.MainClass.createPDFandOutput(MainClass.java:361) at com.xy.deu.xy.abc.db.schemavergleich.MainClass.start(MainClass.java:231) at com.xy.deu.xy.abc.db.schemavergleich.MainClass.main(MainClass.java:180) Below is the code that gets executed as the error occurs. ... // If Table gets to long for a page -> pagebreak: if(currentLines > 37) { pageBreak(currentLinePos); // TODO Currently causing app to crash } ... private void pageBreak(int currentLine) throws Exception { contentStream.endText(); contentStream.close(); // Create new page page = new PDPage(PDPage.PAGE_SIZE_A4); doc.addPage( page ); // Create a new font object selecting one of the PDF base fonts font = PDType1Font.HELVETICA; // Start a new content stream which will "hold" the to be created content contentStream = new PDPageContentStream(doc, page); currentLines = 0; mediabox = page.findMediaBox(); contentStream.beginText(); contentStream.moveTextPositionByAmount(startX, startY); contentStream.setFont(PDType1Font.HELVETICA, 12); } Now comes the strange thing: Debugging yields into nothing that is not set. I'll attach a screenshot for you right at the position where the error occurs:

    Read the article

  • MYSQL/PHP: Inserting data via HTML form, same "input name"

    - by Camen
    I'm new to MySQL and as a learning project I'd like to make a recipe database. I'd like to the user to be able to enter ingredients through a simple HTML form but I'm stuck in how to label the form so that I can enter several ingredients into the database at once. I'd like to do something like this: <form method="post" action="insert.php"> Ingredient 1: <input type="text" name="ingredient"><br /> Ingredient 2: <input type="text" name="ingredient"><br /> Ingredient 3: <input type="text" name="ingredient"><br /> <input type="submit" value="Submit"> </form> When I do this, I add rows to the table but they're all empty. I know it's got something to do with me using "ingredient" (the table value where I want to add the ingredient name) several times in the form, but I just don't know how to solve it. I would absolutely love some input on how to make it work.

    Read the article

  • Responsive: two different toggles on same element

    - by Mathijs Delva
    I'm having difficulties with the following problem. For a responsive website, i need to use the same toggle element for both a toggle system for one window width, and another toggle system for a second window width. I have the following snippets: 1.A simple hover for a language dropdown, which should be executed for resolutions greater than 980px. $('#clickme').hover(function() { $(this).parent().find("#select-language").show(); $(this).find("> a span").css({"opacity":"0.5"}); }, function() { $(this).parent().find("#select-language").hide(); $(this).find("> a span").css({"opacity":"1"}); }); 2.A simple click for the same language toggle, which should be executed for resolutions smaller than 980px. jQuery('#clickme').click(function() { jQuery("#select-language-mobile").slideToggle("fast"); }); I need to nest these two, so that when the user is viewing the website in one resolution, the click function with be fired, and in the other case the hover function. Can anybody help me with this? PS: I'm sorry, but the code blocks don't seem to work at the moment.

    Read the article

  • mysql count rows and grop them by month

    - by user2661296
    I have a table called cc_calls and there I have many call records I want to count them and group them in months I have a timestamp called starttime and I can use that row to extract the month, also limit the count for 12 months the results should be like: Month Count January 768768 February 876786 March 987979 April 765765 May 898797 June 876876 July 786575 August 765765 September 689787 October 765879 November 897989 December 876876 Can anyone guide me or show me the mysql query that I need to get this result.

    Read the article

  • Importing libraries from build.xml file in Eclipse

    - by user3873909
    I am developing a java app and I need to use jnativehook library. I have downloaded the .zip from https://code.google.com/p/jnativehook/downloads/list . There is a bin folder,src folder,build.xml,build.num and 3 .txt files when I extracted this folder. I have included this library in my project by File - project - Java project from existing Ant file And I have tried an example https://code.google.com/p/jnativehook/wiki/examples But I get the following error Exception in thread "main" java.lang.ExceptionInInitializerError at GlobalKeyListenerExample.main(GlobalKeyListenerExample.java:25) Caused by: java.lang.RuntimeException: Unable to locate the native library. at org.jnativehook.GlobalScreen.loadNativeLibrary(GlobalScreen.java:462) at org.jnativehook.GlobalScreen.<init>(GlobalScreen.java:71) at org.jnativehook.GlobalScreen.<clinit>(GlobalScreen.java:53) ... 1 more What location should I give in native library path?

    Read the article

  • Regex for string replace in C#

    - by Jack
    I am trying to achieve below output using regex but not able to, can someone please correct the regex - input string : data-placeholder=""[Refer" to "Conditions To Entry Of The Confirmation Order" and "Conditions To Effective Date" sections]" output string : data-placeholder="[Refer to Conditions To Entry Of The Confirmation Order and Conditions To Effective Date sections]" regex tried \s*"\s*([^ "]+)"\s*(?=["])

    Read the article

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