Daily Archives

Articles indexed Thursday November 8 2012

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

  • Does the term "Learning Curve" include the knowing of the gotchas?

    - by voroninp
    When you learn new technology you spend time understanding its concepts and tools. But when technology meets real life strange and not pleasant things happen. Reuqirements are often far from ideal and differ from 'classic' scenario. And soon I find myself bending the technology to my real needs. At this point I begin to know bugs of the system or that is is not so flexible as it seemed at the very begining. And this 'fighting' with technology consumes a great part of the time while developing. What is more depressing is that the bunch of such gotchas and workarounds are not concentrated at one place (book, site, etc.) And before you really confront it you cannot really ask the correct question because you do not even suspect the reason for the problem to occur (unknown-unknown). So my question consiststs of three: 1) Do you really manage (and how) to predict possible future problems? 2) How much time do you spend for finding the workaround/fix/solution before you leave it and switch to other problems. 3) What are the criteria for you to think about yourself as experienced in the tecnology. Do you take these gotchas into account?

    Read the article

  • What kinds of demos are good to make for a software engineer job

    - by user23012
    I have created my cv site and sent out my demos for a while now, but most of my demos are either from my course or games related since my course was a games programming course, I was wondering what kind of demos are good to show off my skills in programming in general. These are what i already have Pennies:just a simple game first coursework i did. Compiler:coursework for compiler writing module Pongout: basic a pong game in 68k using colour detection Snake: snake in 68k same thing as the pong Game Cube Maze: gamecube work BeatmyBot: basic Ai Basic plat-former game: 2d game with different types of collision Turing Lambda Simulation: my dissertation Turing machine simulated in Miranda. alpha and Beta reduction,and SKI calculus simulated in the Turing machine. What I am asking here is what kind of demos are good to add or have, i have been looking and have hit a tough spot I cant think of anything to make more than games. so for a general graduate software engineer what types would be good examples? EDIT: since responding to the comments bellow well for what languages well my main one would be C++, followed by Java, Erlang and abit of Haskell

    Read the article

  • How do you safely comment out code in Visual Studio and TFS?

    - by burnt1ce
    Once in a while, a co-worker check-ins bad code and this blocks you from your application from initializing properly so you can continue doing your work. To get around this problem quickly, I've commented out the offending code. I accidentally to uncomment out the offending code at the time of check-in and I want to prevent this from happening again. Do you have a trick to 1) disable bad code that stop you from working 2) prevent yourself from checking in unwanted changes? I'm currently using Visual Studio as my IDE and TFS as my source code repo.

    Read the article

  • DDD: Service or Repository

    - by tikhop
    I am developing an app in DDD manner. And I have a little problem with it. I have a Fare (airline fare) and FareRepository objects. And at some point I should load additional fare information and set this information to existing Fare. I guess that I need to create an Application Service (FareAdditionalInformationService) that will deal with obtaining data from the server and than update existing Fare. However, some people said me that it is necessary to use FareRepository for this problem. I don't know wich place is better for my problem Service or Repository.

    Read the article

  • Scuttlebutt Reconciliation in the paper “Efficient Reconciliation and Flow Control for Anti-Entropy Protocols”

    - by soulmachine
    I am reading the paper "Efficient Reconciliation and Flow Control for Anti-Entropy Protocols"! , I couldn't clearly understand Section 3.2 "Scuttlebutt Reconciliation". Here I extract out some sentences from the paper, which especially confuse me. If gossip messages were unlimited in size, then the sets contains the exact differences,just like with precise reconciliation. Scuttlebutt requires that if a certain delta (r; k; v; n) is omitted, then all the deltas with higher version numbers for the same r should be omitted as well. Scuttlebutt satises the global invariant C(p;q) for any two processes p and q:

    Read the article

  • Certifications needed to get an interview with no experience and no degree. [closed]

    - by Joel Cornett
    Possible Duplicate: Are certifications worth it? Given that I have no commercial experience to speak of -- and no undergraduate degree -- how can I best demonstrate my programming ability in order to interview for a job? How valuable are the various software certifications? Should I get the OCA? Should I submit samples of my code? Are there some other skills that I should develop? (I picked up Python and Java fairly quickly--a matter of weeks, actually.) I am a undergrad working on a triple major in math, stat and econ. I consider myself proficient with Python and have a working knowledge of Java.

    Read the article

  • Backup, clean install and restore

    - by Tony Martin
    Due to the route I came into Ubuntu I now have 12.10 upgraded from 12.04 on an NTFS file system. I've invested a lot of time getting everything as I want it, vis packages installed and settings, etc. I wonder if there is an easy method of: 1 Backing up the whole system so that I can; 2 Do a squeaky clean install of 12.10 on ext4 with bells and whistles then; 3 Restore my backup so that my system behaves as it did before the reinstall? Sorry if this seems terribly obvious, but I don't want to find all the problems when it's too late. TIA.

    Read the article

  • SSH Lost Terminal Colors

    - by memecs
    I have to computers with exactly the same configuration (same PS1 etc...). When I ssh from A to B the terminal correctly displays PS1 and file type colors (i.e. blue directories, green executables etc.) But when I ssh from B to A PS1 is set to default and colors disappear. Furthermore, I created public keys to ssh without password from A to B and vice-versa. It works correctly from A to B but it doesn't work from B to A, again I repeated the exact same procedure on both pc: On Host A ssh-keygen ssh-copy-id -i ~/.ssh/id_rsa.pub address.to.host.B On Host B ssh-keygen ssh-copy-id -i ~/.ssh/id_rsa.pub address.to.host.A What could be the problem?

    Read the article

  • Internet connection is very slow

    - by ThanujJA
    I use GSM onnection to surfe internet. Before I move to ubuntu I used windows 7 OS. It gives me good speed with GSM connection (100 kbps) But now ubuntu gives me very slow speed.(2-3 kbps) Now it make difficult to use GSM connection. In my country (Sri Lanka) mobile brodbrand servises are very expensive so I cant move to onother one. If I use GSM connection they gives me free data (Airtel connection) So it is most valuable reason for me to use GSM connection. Please anybody help me to speed up my network. Thanx

    Read the article

  • Unable to install Google Chrome

    - by Jordan
    I receive this in my terminal when I try to install using wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb sudo dpkg -i google-chrome* or sudo dpkg --install /Path/to/chrome.deb I receive Selecting previously unselected package google-chrome-stable. (Reading database ... 146911 files and directories currently installed.) Unpacking google-chrome-stable (from google-chrome-stable_current_i386.deb) ... dpkg: dependency problems prevent configuration of google-chrome-stable: google-chrome-stable depends on xdg-utils (>= 1.0.2). dpkg: error processing google-chrome-stable (--install): dependency problems - leaving unconfigured Processing triggers for man-db ... Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Errors were encountered while processing: google-chrome-stable I then type sudo apt-get install -f And retry installation though it still does not install and I receive the same errors. I have also tried using: sudo apt-get install libxss1 libnspr4-0d libcurl3 Though the above doesn't work either.

    Read the article

  • How to configure the default automount location?

    - by warkior
    I recently upgraded from Mint 12 to Ubuntu 12.10 + Cinnamon. I have an external usb drive that when I plug it in, automatically mounts to /media/[username]/Backup/. Thing is, under Mint, it didn't include the [username] portion. It just mounted to /media/Backup. My question is, how do I switch back to that format? I don't need the drive mounted under my username. Just under media. Thanks in advance.

    Read the article

  • Help with creating symbolic link

    - by user1737794
    I'm a little bit confused with how the symbolic links work. I hope someone can guide me in the right direction. I want to put a demo online from our software, which normally only runs locally on a Mac Mini. So I put all the files in the var/www from my Ubuntu 12.04 server installation. There are a lot of hardcoded links in the software which point to "/Applications/XAMPP/xamppfiles/htdocs/narrowcasting" Of course I can change all these code on my html/php files in /var/www, but that would be quite annoying. I hope I can fix this by creating a symbolic link. For example I have a directory called thumb in /var/www/thumb. The php code is trying to put a image in /Applications/XAMPP/xamppfiles/htdocs/narrowcasting/thumb. Can anyone give me a tip how to achieve this with a symbolic link? Thanks in advance.

    Read the article

  • WiFi slow sometimes, reboot helps, how do I debug it?

    - by January
    Ubuntu 12.04.1 with all updates installed. Laptop Lenovo Thinkpad X230 with Intel Corporation Centrino Advanced-N 6205. WiFi sometimes becomes extremely slow. Often this occurs when I wake the system from suspend and connect to a different network. I find no obvious clues in system logs. /etc/init.d/network-manager restart doesn't help, but a reboot does. How can I go on with debugging this issue? In specific, which parts of the system should I try to restart (without a complete reboot)? I know of problems with Intel WiFi (see for example this question and the instructions here), but if that was the problem, I would expect the WiFi to be slow at all times, and not just sometimes. Also, I have a gut feeling that it might be a DNS issue (for example, getting a page from a known server is faster than accessing a new server), but I don't know how to tackle it. Update: despite numerous updates in the meanwhile, I still observe this behavior. It happens always when I access my WiFi router at home after returning from work; when I reboot my laptop, the connection speed is good again.

    Read the article

  • Wired PS/2 Keyboard and Mouse do not work in 12.04 Live CD or after fresh 12.04 install - Foxconn D270S Atom Motherboard

    - by david krajewski
    My Wired PS/2 keyboard and mouse do not work in 12.04, either in a fresh install or from the Live CD. A USB keyboard and mouse will work. The PS/2 keyboard and mouse will work using the same hardware and a fresh 10.04 Ubuntu install or a fresh Windows 7 install. The motherboard is a Foxconn D270S Atom based motherboard. This problem is specific to this motherboard and Ubuntu 12.04. So far I've tried running in the fresh 12.04 install: sudo apt-get install sudo apt-get upgrade sudo apt-get dist-upgrade After the apt-get upgraded the first time, I now get to the point where there are 0 items to be upgraded. Rebooted and still no PS/2 keyboard/mouse. I've also tried adding the following lines to GRUB at boot time (the PS/2 keyboard works in GRUB) acpi=noirq acpi=off Neither setting made any difference. The motherboard is a Foxconn D270S Atom based motherboard. Even more interestingly, 12.04 recognizes the same PS/2 keyboard and mouse on a separate Gigabyte AM3+ based motherboard. I only have this problem on this particular motherboard with Ubuntu 12.04. Any help would be appreciated. I bought this low-power motherboard specifically for the task of running Ubuntu 12.04 for the next five years... Update... I dug out an old PS/2 mouse that does not use a PS/2 to USB adapter but is directly wired for PS/2. Still no PS/2 keyboard or mouse after reboot. Again, I only have this problem with this motherboard and 12.04 Ubuntu. Other motherboards work fine with 12.04 and this motherboard works fine with 10.04. Update 2... I installed the 12.04 Server version. The text-based installer recognized the keyboard without issue, but after the first boot into the installed OS, the PS/2 keyboard would no longer respond. I tried installing Gnome on the Server install and the PS/2 mouse and keyboard don't work in Gnome either. I Opened bug #995570 for this issue

    Read the article

  • Kernel Panic: line 61: can't open /scripts/functions

    - by Pavlos G.
    I'm facing a problem with all the kernels installed at my system (Ubuntu 10.10 64-bit). Installed kernel versions: 2.6.32-21 up to 2.6.35.23. The booting halted with the following error: init: .: line 61: can't open '/scripts/functions' Kernel panic - not syncing: Attempted to kill init! Pid: 1, comm: init not tainted Only the first one (2.6.32-21) was working up until know. I asked for help at ubuntuforums.org and i was told to check if there's any problem regarding my graphics card (ATI Radeon). I uninstalled all the ATI-related packages as well as all the unecessary xserver-xorg-video-* drivers that were installed. I then rebooted and from then on ALL of the kernels halt with the same error (i.e. it didn't fix the problematic kernels, it just broke the only one that was working...) Any ideas on what i should try next? Thanks in advance. Pavlos.

    Read the article

  • Why do my 512x512 bitmaps look jaggy on Android OpenGL?

    - by Milo Mordaunt
    This is sort of driving me nuts, I've googled and googled and tried everything I can think of, but my sprites still look super blurry and super jaggy. Example: Here: https://docs.google.com/open?id=0Bx9Gbwnv9Hd2TmpiZkFycUNmRTA If you click through to the actual full size image you should see what I mean, it's like it's taking and average of every 5*5 pixels or something, the background looks really blurry and blocky, but the ball is the worst. The clouds look all right for some reason, probably because they're mostly transparent. I know the pngs aren't top notch themselves but hey, I'm no artist! I would imagine it's a problem with either: a. How the pngs are made example sprite (512x512): https://docs.google.com/open?id=0Bx9Gbwnv9Hd2a2RRQlJiQTFJUEE b. How my Matrices work This is the relevant parts of the renderer: public void onDrawFrame(GL10 unused) { if(world != null) { dt = System.currentTimeMillis() - endTime; world.update( (float) dt); // Redraw background color GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT); Matrix.setIdentityM(mvMatrix, 0); Matrix.translateM(mvMatrix, 0, 0f, 0f, 0f); world.draw(mvMatrix, mProjMatrix); endTime = System.currentTimeMillis(); } else { Log.d(TAG, "There is no world...."); } } public void onSurfaceChanged(GL10 unused, int width, int height) { GLES20.glViewport(0, 0, width, height); Matrix.orthoM(mProjMatrix, 0, 0, width /2, 0, height /2, -1.f, 1.f); } And this is what each Quad does when draw is called: public void draw(float[] mvMatrix, float[] pMatrix) { Matrix.setIdentityM(mMatrix, 0); Matrix.setIdentityM(mvMatrix, 0); Matrix.translateM(mMatrix, 0, xPos, yPos, 0.f); Matrix.multiplyMM(mvMatrix, 0, mvMatrix, 0, mMatrix, 0); Matrix.scaleM(mvMatrix, 0, scale, scale, 0f); Matrix.rotateM(mvMatrix, 0, angle, 0f, 0f, -1f); GLES20.glUseProgram(mProgram); posAttr = GLES20.glGetAttribLocation(mProgram, "vPosition"); texAttr = GLES20.glGetAttribLocation(mProgram, "aTexCo"); uSampler = GLES20.glGetUniformLocation(mProgram, "uSampler"); int alphaHandle = GLES20.glGetUniformLocation(mProgram, "alpha"); GLES20.glVertexAttribPointer(posAttr, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false, 0, vertexBuffer); GLES20.glVertexAttribPointer(texAttr, 2, GLES20.GL_FLOAT, false, 0, texCoBuffer); GLES20.glEnableVertexAttribArray(posAttr); GLES20.glEnableVertexAttribArray(texAttr); GLES20.glActiveTexture(GLES20.GL_TEXTURE0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texture); GLES20.glUniform1i(uSampler, 0); GLES20.glUniform1f(alphaHandle, alpha); mMVMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVMatrix"); mPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uPMatrix"); GLES20.glUniformMatrix4fv(mMVMatrixHandle, 1, false, mvMatrix, 0); GLES20.glUniformMatrix4fv(mPMatrixHandle, 1, false, pMatrix, 0); GLES20.glDrawElements(GLES20.GL_TRIANGLE_STRIP, 4, GLES20.GL_UNSIGNED_SHORT, indicesBuffer); GLES20.glDisableVertexAttribArray(posAttr); GLES20.glDisableVertexAttribArray(texAttr); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0); } c. How my texture loading/blending/shaders setup works Here is the renderer setup: public void onSurfaceCreated(GL10 unused, EGLConfig config) { // Set the background frame color GLES20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); GLES20.glDisable(GLES20.GL_DEPTH_TEST); GLES20.glDepthMask(false); GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA); GLES20.glEnable(GLES20.GL_BLEND); GLES20.glEnable(GLES20.GL_DITHER); } Here is the vertex shader: attribute vec4 vPosition; attribute vec2 aTexCo; varying vec2 vTexCo; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; void main() { gl_Position = uPMatrix * uMVMatrix * vPosition; vTexCo = aTexCo; } And here's the fragment shader: precision mediump float; uniform sampler2D uSampler; uniform vec4 vColor; varying vec2 vTexCo; varying float alpha; void main() { vec4 color = texture2D(uSampler, vec2(vTexCo)); gl_FragColor = color; if(gl_FragColor.a == 0.0) { "discard; } } This is how textures are loaded: private int loadTexture(int rescource) { int[] texture = new int[1]; BitmapFactory.Options opts = new BitmapFactory.Options(); opts.inScaled = false; Bitmap temp = BitmapFactory.decodeResource(context.getResources(), rescource, opts); GLES20.glGenTextures(1, texture, 0); GLES20.glActiveTexture(GLES20.GL_TEXTURE0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texture[0]); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR); GLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR); GLUtils.texImage2D(GLES20.GL_TEXTURE_2D, 0, temp, 0); GLES20.glGenerateMipmap(GLES20.GL_TEXTURE_2D); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0); temp.recycle(); return texture[0]; } I'm sure I'm doing about 20,000 things wrong, so I'm really sorry if the problem is blindingly obvious... The test device is a Galaxy Note, running a JellyBean custom ROM, if that matters at all. So the screen resolution is 1280x800, which means... The background is 1024x1024, so yeah it might be a little blurry, but shouldn't be made of lego. Thank you so much, any answer at all would be appreciated.

    Read the article

  • Keep 3d model facing the camera at all angles

    - by Sparky41
    I'm trying to keep a 3d plane facing the camera at all angles but while i have some success with this: Vector3 gunToCam = cam.cameraPosition - getWorld.Translation; Vector3 beamRight = Vector3.Cross(torpDirection, gunToCam); beamRight.Normalize(); Vector3 beamUp = Vector3.Cross(beamRight, torpDirection); shipeffect.beamWorld = Matrix.Identity; shipeffect.beamWorld.Forward = (torpDirection) * 1f; shipeffect.beamWorld.Right = beamRight; shipeffect.beamWorld.Up = beamUp; shipeffect.beamWorld.Translation = shipeffect.beamPosition; *Note: Logic not wrote by me i just found this rather useful It seems to only face the camera at certain angles. For example if i place the camera behind the plane you can see it that only Roll's around the axis like this: http://i.imgur.com/FOKLx.png (imagine if you are looking from behind where you have fired from. Any idea what to what the problem is (angles are not my specialty) shipeffect is an object that holds this class variables: public Texture2D altBeam; public Model beam; public Matrix beamWorld; public Matrix[] gunTransforms; public Vector3 beamPosition;

    Read the article

  • OpenGLES GLSL Shader attributes always bound to 0

    - by codemonkey
    So I have a very simple vertex shader as follows #version 120 attribute vec3 position; attribute vec3 inColor; uniform mat4 mvp; varying vec3 fragColor; void main(void){ fragColor = inColor; gl_Position = mvp * vec4(position, 1.0); } Which I load, as well as the fragment shader: #version 120 varying vec3 fragColor; void main(void) { gl_FragColor = vec4(fragColor,1.0); } Which I then load, compile, and link to my shader program. I check for link status using glGetProgramiv(shaderProgram, GL_LINK_STATUS, &shaderSuccess); which returns GL_TRUE so I think its ok. However, when I query the active attributes and uniforms using #ifdef DEBUG int totalAttributes = -1; glGetProgramiv(shaderProgram, GL_ACTIVE_ATTRIBUTES, &totalAttributes); for(int i=0; i<totalAttributes; ++i) { int name_len=-1, num=-1; GLenum type = GL_ZERO; char name[100]; glGetActiveAttrib(shaderProgram, GLuint(i), sizeof(name)-1, &name_len, &num, &type, name ); name[name_len] = 0; GLuint location = glGetAttribLocation(shaderProgram, name); fprintf(stderr, "Attribute %s is bound at %d\n", name, location); } int totalUniforms = -1; glGetProgramiv(shaderProgram, GL_ACTIVE_UNIFORMS, &totalUniforms); for(int i=0; i<totalUniforms; ++i) { int name_len=-1, num=-1; GLenum type = GL_ZERO; char name[100]; glGetActiveUniform(shaderProgram, GLuint(i), sizeof(name)-1, &name_len, &num, &type, name ); name[name_len] = 0; GLuint location = glGetUniformLocation(shaderProgram, name); fprintf(stderr, "Uniform %s is bound at %d\n", name, location); } #endif I get: Attribute inColor is bound at 0 Attribute position is bound at 1 Uniform mvp is bound at 0 Which leads to failure when trying to use the shader to render the objects. I have tried switching the order of declaration of position & inColor, but still, only position is bound with the other two giving 0 Can someone please explain why this is happening? Thanks

    Read the article

  • Find Nearest Object

    - by ultifinitus
    I have a fairly sizable game engine created, and I'm adding some needed features, such as this, how do I find the nearest object from a list of points? In this case, I could simply use the Pythagorean theorem to find the distance, and check the results. I know I can't simply add x and y, because that's the distance to the object, if you only took right angle turns. However I'm wondering if there's something else I could do? I also have a collision system, where essentially I turn objects into smaller objects on a smaller grid, kind of like a minimap, and only if objects exist in the same gridspace do I check for collisions, I could do the same thing, only make the gridspace larger to check for closeness. (rather than checking every. single. object) however that would take additional setup in my base class and clutter up the already cluttered object. TL;DR Question: Is there something efficient and accurate that I can use to detect which object is closest, based on a list of points and sizes?

    Read the article

  • Get the newest file from directory structure year/month/date/time

    - by Radek
    I store backups of databases in a directory structure year/month/day/time/backup_name an example would be basics_mini/2012/11/05/012232/RATIONAL.0.db2inst1.NODE0000.20110505004037.001 basics_mini/2012/11/06/012251/RATIONAL.0.db2inst1.NODE0000.20110505003930.001 note that timestamp from the backup file cannot be used. Before the automation testing starts the server time is set to 5.5.2011 So the question is how I can get the latest file if I pass the "base directory" (basics_mini) to some function that I am going to code. My thoughts are that I list the base directory and sort by time to get the year. Then I do the same for month, day and time. I wonder if there is any "easier" solution to that in php.

    Read the article

  • locationManager didFailWithError null phonegap simulator

    - by ateam
    I am having following problem with the location service with IOS on the simulator: using phonegap 2.2.0 with xcode 4.5.2, Cordova.plist EnableLocation = YES navigator.geolocation.getCurrentPosition(myPositionSuccess, myPositionError, {maximumAge: 300000, timeout:10000, enableHighAccuracy : true}); myPositionSuccess is never called, with following error at navigator.geolocation locationManager::didFailWithError (null) I just tried it on the simulator. Any Idea?

    Read the article

  • SQL command to get field of a maximum value, without making two select

    - by António Capelo
    I'm starting to learn SQL and I'm working on this exercise: I have a "books" table which holds the info on every book (including price and genre ID). I need to get the name of the genre which has the highest average price. I suppose that I first need to group the prices by genre and then retrieve the name of the highest.. I know that I can get the results GENRE VS COST with the following: select b.genre, round(avg(b.price),2) as cost from books b group by b.genre; My question is, to get the genre with the highest AVG price from that result, do I have to make: select aux.genre from ( select b.genre, round(avg(b.price),2) as cost from books b group by b.genre ) aux where aux.cost = (select max(aux.cost) from ( select b.genre, round(avg(b.price),2) as cost from books l group by b.genre ) aux); Is it bad practice or isn't there another way? I get the correct result but I'm not confortable with creating two times the same selection. I'm not using PL SQL so I can't use variables or anything like that.. Any help will be appreciated. Thanks in advance!

    Read the article

  • OS memory allocation addresses

    - by user1777914
    Quick curious question, memory allocation addresses are choosed by the language compiler or is it the OS which chooses the addresses for the memory asked? This is from a doubt about virtual memory, where it could be quickly explained as "let the process think he owns all the memory", but what happens on 64 bits architectures where only 48 bits are used for memory addresses if the process wants a higher address? Lets say you do a int a = malloc(sizeof(int)); and you have no memory left from the previous system call so you need to ask the OS for more memory, is the compiler the one who determines the memory address to allocate this variable, or does it just ask the OS for memory and it allocates it on the address returned by it?

    Read the article

  • CSS Collapsing/Hiding divs with no data in <span>

    - by Chance
    I am trying to display an address which includes the following information: Title, division, address1, address2, town/state/zip, and country (5 seperate lines worth of data). The problem is sometimes the company may only have the title, address1, and town/state/zip yet other times it may be all but address2. This is determined upon a db record request server side. Therefore how can I make my output look proper when some of my labels will be blank? I would like div's that contain an empty span to be essentially collapsed/removed. My only idea of how was to use jquery and a selector to find all divs with blank spans (since thats all an asp.net label really is) and then remove those divs however this seems like such bad form. Is there any way to do this with css? Possible Code would be something like: $('span:empty:only-child').parent('div').remove(); Picture Examples (Ignore spacing/indentation issues which I will fix) Missing Division, Address2, and Country All Possible Fields The Html <asp:Label runat="server" ID="lblBillingAddressHeader" CssClass="lblBillingAddressHeader" Text="Billing Address:" /> <div style="position:relative; top:150px; left: 113px;"> <div class="test"> <asp:Label runat="server" ID="lblBillingDivision" CssClass="lblBillingShippingDivisionFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress" CssClass="lblBillingShippingFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress2" CssClass="lblBillingShippingFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress3" CssClass="lblBillingShippingFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress4" CssClass="lblBillingShippingFont" /> </div> </div> The CSS .test { position: relative; top: 0px; left: 0px; height: 12px; width: 300px; } .lblBillingShippingDivisionFont { font-size: small; font-weight: bold; } .lblBillingShippingFont { font-size: 10.6px; }

    Read the article

  • Correct way to set the driverOptions for Doctrine DBAL configuration in symfony2

    - by yesIcan
    I have set driverOptions in the config file as mentioned in the doctrine DBAL documentation. But this gives and error 1/1 InvalidConfigurationException: Unrecognized options "driverOptions" under "doctrine.dbal.connections.pdoDevCon" My config file is dbal: default_connection: pdoDevCon connections: pdoDevCon: driver: %dev_database_driver% # < host: %dev_database_host% # | port: %dev_database_port% # | Defined in user: %dev_database_user% # | password: %dev_database_password% # < charset: UTF8 driverOptions: {3: 2} mapping_types: enum: string set: string orm: auto_generate_proxy_classes: %kernel.debug% pdoDevCon: connection: pdoDevCon mappings: AcmeDemoBundle: ~ AcmeHelloBundle: ~ I am using PDO::ATTR_ERRMODE as 3 PDO::ERRMODE_EXCEPTION as 2, it does not work even if i use the strings.

    Read the article

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