Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
 Positioning of "logo" and "navbar" inside header Your ul had margin and padding :) Working Fiddle header ul{ float:right; padding: 0; margin: 0; } header ul li{ display: inline; float:left; } header a{ color:white; background:rgba(0,0,0,0.1); display:inline-block; padding:0px 25px; height:60px; line-height:60px; text-align:center; font-family: 'Roboto Slab', serif; text-decoration:none; text-transform:uppercase; letter-spacing:2px; font-weight:700; } I also changed the left and right padding on the header a for the sake of the fiddle. Categories : HTML intel kernel builder, failed to create context for intel opencl cpu device According to this Site, Intels OpenCL SDK does not support Core2 Duo/Quad CPUs (because they do not support SSe 4.2): http://software.intel.com/en-us/articles/intel-sdk-for-opencl-applications-2013-release-notes#_System_Requirements_1 So the compiler cannot create the context for this device. You may be able to work around this by explicitly choosing the target architecture in the Option Dialog. I'm not sure this will work and the code will certainly not run. If you want to use OpenCL on you machine, try the AMD APP SDK, which supports every x86 with at least SSE2: http://developer.amd.com/tools/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/ That, however, will not work with Intel's KernelBuilder. Categories : Windows Split ul in half and wrap those 2 parts around a div (logo inside dynamic menu) $(function(){ var liCount =$('#top-menu>li').length / 2 -1; $('#top-menu>li').eq(Math.floor(liCount)).append(" • "); }); So what I did here is count the number of li inside of #top-menu, subtracted one because eq is zero based. Then appended #logo inside of a new li and place it right after the middle of your li's. It will look better if you have an even number of li's Categories : Jquery Why is scanf stuck inside a while loop? The in your scanf format is interpreted as "any amount of whitespace". It keeps reading whitespace (spaces, tabs, or carriage returns) until it hits something that isn't whitespace. Categories : C Responsive Logo - Menu Overlaps Logo You can't use fixed dimensions AND get the responsive, resizing qualities you are looking for. Furthermore, you shouldn't use a background image if you want it resizing. To fix you code, it is simple. Add the background image as a html image inside of your Next, remove the following from your css: #rt-logo{background:url("../images/logo/logo1.png") no-repeat;} #rt-logo{margin:-9px 0 0 0;width:172px;height:84px;display:block;} Categories : CSS Wait for a logo to load, fade in the logo, fade out after delay then fade in rest of site Cool thing about jQuery is it lets you chain functions together, and some functions (luckily in your case "FadeIn/Out" come with a callback function)!$(document).ready(function () { // simplest solution $('img').hide(0).delay(3000).fadeIn(333, function () {$(this).fadeOut(333, function () { \$('#content').fadeIn(333); }); }); }); http://jsfiddle.net/whiteb0x/JRtGS/ Categories : Jquery intel x86 - why does -4(%ebp) refers to nothing? On the x86 ebp is typically used as the frame pointer and esp is the stack pointer. Around the frame pointer the frame pointer of the caller and the return address are saved. That could explain the gap. In my assembly actually -4(%ebp) is used, so maybe we are looking at a different ABI, but there should always be a gap for the stack administration. About the -20 subtracted from the stack pointer and still access -24(%ebp): there is probably a push after the movl %esp, %ebp in your assembly, which would account for an additional 4 bytes. Categories : C error with using intel aes API -lname is an abbreviation for libname.a (or other library suffixes, such as libname.dylib). To use a library file that does not begin with lib, simply specify a path to it, the same as you would do with a source file or object file. (In this case, you do not need the -L either, as that specifies paths to be searched when -l is used.) So you could use this command: gcc -I/home/xxx/Documents/Intel_AESNI_Sample_Library_v1.2/intel_aes_lib/include intel_aes.c /home/xxx/Documents/Intel_AESNI_Sample_Library_v1.2/intel_aes_lib/lib/x64/intel_aes64.a Categories : C Intel 8086, a few little things MOV AL,4 is encoded to B004. MOV AX, DS:5678h is an invalid combination of opcode and operands. This will not compile. SUB BX, [DI+6] is encoded to 2B5D06. For those interested, this is how to decode compiled 16-bit assembler. ... this may be a good wiki. Firstly: This was done on Mac OS X, but any Linux distribution can use the tools described. In x86 (8086) assembler language, as well as many other assembly languages, the assembler compiles (barely) human-readable mnemonics to bytecode. Each mnemonic converts to a specific bytecode. For example: XOR AX, AX encodes to 31C0. To decode machine-language, you will need your favorite text editor, NASM (Netwide Assembler), and a hex editor. Step 1: Enter your mnemonic to decode in your text editor, with the [BITS 16] instruction firs Categories : Assembly GCD Iteratively in x86 intel Assembly I bet remainder is set to 0 before you reach the first iteration of calculation_loop, and that's why it's jumping out of calculation_loop immediately. That's your problem, but what about a solution? You should order your code differently, so it functions like a do-while instead of a while loop. I reordered your instructions, so that the code functions like a do-while loop: ; calculation loop calculation_loop: ; set b to a mov ecx, intA mov intB, ecx ; set a to r mov ecx, remainder mov intA, ecx ; clear remainder (I don't think this is nessesary, can't say for sure) mov edx, 0 ;process remainder and store in variable mov ecx, intA div ecx mov remainder, edx ; write data mov eax, remainder call WriteInt Categories : Assembly AT&T to Intel assembly converter There's a not-quite-complete Perl script here that might help you out if you're up for making some modifications/extensions to anything missing: http://boinc.berkeley.edu/android-boinc/libssl/crypto/perlasm/x86_64-xlate.pl If not, just run Att2Intl in DOSBox or a WinXP VM. If you don't have access to XP, you could also try installing ReactOS in a VM. I believe they used DOSBox source to implement the DOS layer so that may provide a long-term solution without having to resort to actually running DOSBox every time. Categories : Assembly Java development using INTEL SDK There is a java tutorial out on the Perceptual Computing Download Site. This tutorial is in the SDK Documentation - look under "SDK Tutorials" and "My First Java Application" You will need to install JDK 1.7.0_11 or later. Set the environment variable JAVA_HOME to point to the installation directory for easy reference. 1.Create a directory called Java1. 2.Launch any editor and enter the Java code Java1.java. import intel.pcsdk.*; import java.lang.System.*; public class Java1 { public static void main(String s[]) { PXCUPipeline pp=new PXCUPipeline(); if (!pp.Init(PXCUPipeline.GESTURE)) { System.out.print("Failed to initialize PXCUPipeline "); System.exit(3); } for (;;) { if (!pp.AcquireFrame(true)) break; PXCMGesture.GeoNode[] nodes=new PXCMGest Categories : Java Hyperthreading intel processors and C On suggestion of @us2012 I post this here from my comment... There is no such magic. Superscalar CPUs, especially OOO (Out Of Order execution) processors do magic - but that is inside one core. On the contrary, Hyperthreading can be thought of as (very simplified) two pipelines in front of one complete core. AMD Bulldozer CPUs have a similar bit, but they went a step further: the integer core is split into two too, but the two pipelines + integer cores share one floating point unit. This whole is called a "module", having two threads. TL;DR Superscalar (from the Wiki) A superscalar CPU architecture implements a form of parallelism called instruction level parallelism within a single processor. It therefore allows faster CPU throughput than would otherwise be possible at a given c Categories : C Intel TBB it's 2 time slower than std - tbb vs std You are sharing the random number generator (RNG) for all the workers that ITBB will control, which, as I see from your question, will be four. Leaving aside the issue of thread safety of mutating the state of the RNG from multiple threads, I would point to the effect on cache: the same memory used by the RNG state is accessed for both reading and writing from four processors, something that most likely renders useless the cache. Let's try this: #include #include #include #include #include #include #include "config.hpp" static thread_local std::mt19937 mt; static thread_local std::uniform_int_distribution dist(0, 499); int main() { std Categories : C++ Intel instruction set: multiply with EAX, EBX, ECX or EDX? The instruction set is simply defined that way. Intel could have defined it in other ways, including ways that would have allowed you to completely specify input and output registers, but they did not. The excuse is arguably that at the time the various multiply instructions were added to the instruction set of the CPU (8086 vintage, I think), that the existing instruction didn't have any obvious places to put multiply where it could share the general decoding scheme available to other instructions (e.g., mov, add, xor, etc), that there were not a lot of available transistors to do fancy decoding schemes to enable some other way to encode general operands, and that any transistors that were available were better dedicated to the multiplication/division logic. Finally, the multiply instr Categories : Assembly Intel x86 to ARM assembly conversion Answer to Question 1 The MOV instruction on ARM only has 12 bits available for an immediate value, and those bits are used this way: 8 bits for value, and 4 bits to specify the number of rotations to the right (the number of rotations is multiplied by 2, to increase the range). This means that only a limited number of values can be used with that instruction. They are: 0-255 256, 260, 264,..., 1020 1024, 1040, 1056, ..., 4080 etc And so on. You are getting that error because your constant can't be created using the 8 bits + rotations. You can load that value onto the register following instruction: LDR r0, =0x0804c000 Notice that this is a pseudo-instruction though. The assembler will basically put that constant somewhere in your code and load it as a memory location with some of Categories : C Logo with a link Like this remove div tag and add class on a tag HTML DEMO Categories : HTML Display Logo and Nav on same bar CSS you can either float the