Search code

92619 results
1

votes
3

answer

Colorize code inside <code></code> [closed]

I'm looking for a open source PHP script to colorize the code inside or [code][/code] tags. Thanks
horgen
19

votes
2

answer

Code Contracts + Code Analysis

I think about starting to use Code Contracts in my code base. I already use Code Analysis with all rules enabled and a goal of zero warnings. However, when using Contract.Requires(parameter != null) I get a warning from Code Analysis, namely CA1062: CA1062 : Microsoft.Design : In externally visible...
Daniel Hilgarth
1

votes
2

answer

Code Contracts vs Code Analyzers

I'm about to embark on a new C# project. I was wondering what the difference is between using Code Contracts or Code Analyzers (in Roslyn). Am I misunderstanding the usage of each? Being a new project, I would like to maintain the integrity of the code. So I want other developers to adhere to specif...
Jon Meyers
2

votes
2

answer

Is System.Data.SqlClient code managed code?

Are the queries executed in a C# progamm using System.Data.SqlClient namespace cosnidered managed or umanaged code? Every time the connection is closed , (conn.Close() method is used) does the resource consider released or we have to dispose it in order to get released?
apomene
4

votes
9

answer

Code Generator vs Code Refactoring

How do you like your CRUD programs. Code-generated, framework-driven, or manually written?
Michael Buen
3

votes
3

answer

Code razor within Javascript code

The code below does not work. I've tried all forms @: @() @{} The apparent problem is the { and } at the beginning and end. (Required, as are parameters) function initializeFileUploader() { SetUploader('/Projects/ImageUpload', 'Images', true, ['jpg', 'jpeg', 'png', 'gif', 'zip'], { ProjectID: @Model...
ridermansb
4

votes
1

answer

Kernel Code vs User Code

Here's a passage from the book When executing kernel code, the system is in kernel-space execut- ing in kernel mode.When running a regular process, the system is in user-space executing in user mode. Now what really is a kernel code and user code. Can someone explain with example? Say i have an appl...
Kraken
3

votes
5

answer

Assembler code in C++ code

How can I put Intel asm code into my c++ application? I'm using Dev-C++. I want to do sth like that: int temp = 0; int usernb = 3; pusha mov eax, temp inc eax xor usernb, usernb mov eax, usernb popa This is only example. How can I do sth like that? UPDATE: How does it look in Visual Studio ?
Hooch
2

votes
5

answer

Code OnTime ASP.Net code generator

Does somebody tested Code OnTime on a real world project (codeontime.com)? Technology looks promising, but their free version restrictions are too restrictive. I managed to put only few tables in a model, real DB has 20+tables. Also it is not clear how generated site works where DB contains lot of r...
Alsin
2

votes
1

answer

Object Code vs. Machine Code

Machine code is the Processor Specific Binary Representation of the Instructions that a program is translated into; lowest level instructions from the processor architecture's instruction set. The operating system is the agent responsible for passing the (((Binary))) instructions to the processor th...
6

votes
1

answer

managed code vs unmanaged code

I'm trying to get my mind wrapped around the concept of managed vs unmanaged code. Correct me if I'm wrong but managed code is anything that gets compiled down to bytecode while unmanaged code gets compiled down to machine code. Is this correct?
conterio
3

votes
0

answer

Powershell Code to C# Code

is possible to convert PowerShell code .PS1 to C# code? I'v been looking to it on google but I always find the contrary. So, I think it's possible PS1 to C# too. Reflector has only the AddIn to convert DLL t oPS Code
hello B
6

votes
3

answer

Javascript key code =/= char code

I'm binding on the keydown event with jQuery to allow some specific characters in a textbox. I'm trying to make my code cross browser and platform compliant. My main issue is that I can't find a way to map the received key code to a valid char code, especially for key code coming from the numeric pa...
Fabian Vilers
4

votes
2

answer

Displaying code using code highlighter

I want to insert some programming code along with the descriptions like a tutorial site. This is the sample code for HTML code: $code = " This is introduction to HTML [code] This is sample descriptions [/code] This is sample for PHP [code]
Code
2

votes
1

answer

Formatting code in code blocks

I have recently gone from java(in eclipse) to C++ in code blocks, and I was wondering if there was a way to format code in code blocks like there is in eclipse (ctrl+shift+F), if not could someone point me towards a plugin or something of the like?
2

votes
1

answer

Code documentation outside code file

For some reasons, i want to document an API but I don't want to write the documentation directly inside the source code as it is now widely done. I'm looking for a documentation generator tool which could take as input a documentation file and be able do fetch function prototype from source code and...
Valentin Perrelle
4

votes
2

answer

Cython code inside Python code

There are several ways of using Cython with Python. First version (standard): you write your Cython code mylib.pyx, then you run this setup.py: from distutils.core import setup from Cython.Build import cythonize setup(ext_modules = cythonize("mylib.pyx")) that compiles it into a .pyd file, and then,...
Basj
1

votes
2

answer

Assembly Code to C code

I'm trying to translate this assembly code to C and I need help. It has something to do with a while loop but i don't know what happens in the while loop. I've looked at it for a while and i'm sure it contains "while(something =! null)" then do something but I don't know what happens when the code d...
Jonah Ruffer
2

votes
7

answer

“Code covered” vs. “Code tested”?

Converting my current code project to TDD, I've noticed something. class Foo { public event EventHandler Test; public void SomeFunction() { //snip... Test(this, new EventArgs()); } } There are two dangers I can see when testing this code and relying on a code coverage tool to determine if you have e...
Matthew Scharley
1

votes
3

answer

VB code to C# code

I have this VB code that I am converting for someone, but he didn't comment it, so what does it mean Dim Arguments As String = path & "\" & fs & ".freeze" & " ls"
Cole Johnson
191

votes
8

answer

Assembly code vs Machine code vs Object code?

What is the difference between object code, machine code and assembly code? Can you give a visual example of their difference?
mmcdole
2

votes
4

answer

How can I escape all code within <code></code> tags to allow people to post code?

What I want to do is to allow users to post code if they need to, so it is viewable and it doesn't render. For example: Hello Should be turned into: <span> <div id="hkhsdfhu"></div> </span> <h1>Hello</h1> Only if it is wrapped in tags. Right now I am using the following function to allow only certa...
Nathan
21

votes
3

answer

Is it normal that YARD doesn't replace `code` with <code>code</code>?

I'm just starting to use YARD for documenting my Rails app. I didn't specify any specific Markup handler, but I would have expected that `code` would be converted to code, which doesn't seem to happen. Is this normal behavior? Do I have to add some additional option to make this work? Thank you.
Joshua Muheim
2

votes
3

answer

I have a confusion when differentiating between Source code, Object code, Assembly code, and Machine code

I read every where that we write source code (High level language), the compilers converts it into a machine code (Low level language). Then i read that there is an assembler, which converts assembly code into a machine code. Then When differentiating compiler and interpreter, i read that compiler f...
Zeeshan Jaan
1

votes
2

answer

Porting PHP code to Delphi code [closed]

I am working on integrating tor to my Delphi application; the whole story is explained in this link After that I searched the internet then I found a code to switch new identity in PHP function tor_new_identity($tor_ip='127.0.0.1', $control_port='9051', $auth_code=''){ $fp = fsockopen($tor_ip, $con...
steve0
2

votes
4

answer

unsure about this code, has code smell!

This code is bugging me, I created a separate object EventDistance but i think its probably not needed, its just that im not sure how to code it differently. Distance is a property i have added to a partial class for Event. Basically I want to return all events and ordered by distance. Im thinking...
raklos
2

votes
2

answer

Node.JS: test code vs. production code organization

From a cursory look in several node.js projects on Github I noticed that the common convention is to put test files under a ./spec directory (exact name may vary: ./tests, ./specs, etc.). Let's call this the "classic" project organization. On the other hand, there is also (at least theoretically) th...
Itay Maman
5

votes
1

answer

Pinterest API - Authorisation Code - Error Code '2'

We're getting the following error when attempting to get an authentication code when the user is not already logged into Pinterest: {"status": "failure", "message": "Authentication failed.", "code": 2, "data": null} Example of url we are using to authenticate: https://api.pinterest.com/oauth/?client...
Graham House
2

votes
1

answer

Netbeans code template (code completion) dropdown menu

I'm working with netbeans code templates, using it to parse information from a file and generate a drop-down menu of code completion options from this. I have been following this tutorial: http://platform.netbeans.org/tutorials/nbm-code-completion.html I've been able to mostly get it working, except...
Josh Johnson
7

votes
3

answer

Accessing code-behind variables from page code

I have the following two pages: Default.aspx Default.aspx.cs How do I access variables in the code-behind file (Default.aspx.cs) from my embedded code in (Default.aspx) with the syntax?
Birdman
2

votes
1

answer

Converting C# code to Java code

I have to convert this little piece of C# code to Java: const int AM = 65521; int GetCCSufix(string a) { int c = 1, b = 0, d, e; var chars = a.ToCharArray(); for(e =0; e< chars.Length; e ++) { d = chars[e]; c = (c + d) % AM; b = (b + c) % AM; } return b
Xander
3

votes
2

answer

Writing a Code to Indent Code

My goal is to write a C program that indents the C code given in char *input. The style of one level of indentation is given in the string const char *pad. I've wrote the following code, which works find in my head but doesn't in practice. There must be a mistake somewhere, but I can't find it. Als...
Zora
3

votes
1

answer

Code::Blocks, static code analysis included (cppcheck)?

The Cppcheck website tells me that Code::Blocks has Cppcheck built in. The Wikipedia page on IDEs tells me that Code::Blocks has an integrated static code analysis (that would be Cppcheck then, wouldn't it?). Where can I find it? Looked through all menus and plugins and documentation that I could fi...
blubberbernd
1

votes
2

answer

Selecting block of code in vs code

Is there a keyboard shortcut or an extension that would allow me to select a block of code? I'd like to select everything between curly braces, between html tags, etc.
Devin
1

votes
1

answer

Update code generated by Swagger code-gen

I have generated the code from swagger.yaml file using swagger code-gen in spring. Now I have updated the swagger.yaml file for my API and added few more HTTP operations. Will it be possible to update the existing code generated previously automatically without merging it manually?
Chandresh Mishra
3

votes
1

answer

Dynamic code execution: String -> Runtime code VB.net

I'm trying to execute some code inside a string in runtime. I.E. Dim code As String = "IIf(1 = 2, True, False)" How do i run the code inside code string ?
Developer
7

votes
3

answer

C# code to Objective C Equivalent Code

I am trying to convert code written in C# to objective c, I tried but unable to get the same result . Any help will be appreciable. internal static class Common  { static string encryptionKey = "0C61L2FSL2F3E7X8E9T1L2F3E4O5"; static byte[] salt = new byte[] {0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x6...
maddy110989
5

votes
2

answer

C- Efficient code vs Good Code [closed]

I am learning C, and so far have a decent understanding of the language, I recently implemented a singly linked list which is pretty simple. I had watched a Ted Talks with Linus Torvalds, he had mentioned good code vs bad code and provided these two examples of removing an entry from a linked list:...
octain
8

votes
3

answer

Reverse engineer assembly code to c code

I think this is actually a pretty simple problem. I have to reverse engineer this assembly code to c code. I'll also provide what I think is going on so you can hopefully point to where I went wrong and I can learn from my mistakes now. .LFBO pushq %rbp movq %rsp,%rbp movl %edi,-4(%rbp) mo...
scottybobby
3

votes
1

answer

Why is gray code called reflected code?

I understand that each gray code differs from its preceding code by one bit, but i don't exactly understand why its called reflected. I came across this website https://www.pc-control.co.uk/gray_code.htm, where it says " The gray code is sometimes referred to as reflected binary, because the first e...
lordvcs
Смотреть фильмы онлайн бабушка легкого поведения 2 фильм бесплатно