Search Results

Search found 195 results on 8 pages for 'reversed'.

Page 3/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Palindrome Golf

    - by Claudiu
    The goal: Any language. The smallest function which will return whether a string is a palindrome. Here is mine in Python: R=lambda s:all(a==b for a,b in zip(s,reversed(s))) 50 characters. The accepted answer will be the current smallest one - this will change as smaller ones are found. Please specify the language your code is in.

    Read the article

  • Fernflower Java decompiler help

    - by Nik
    As the author has forgotten to add a detailed usage listing (or I can't find it), I wonder if anyone knows anything about the command-line options accepted by the FernFlower decompiler application. You can find an online version here: http://www.reversed-java.com/fernflower/ I'm trying to enable/disable all these flags that are present on that webpage. The actual command-line JAR can be found here: https://github.com/Bukkit/Bukkit-MinecraftServer Many thanks Nik

    Read the article

  • reverse this function

    - by ooo
    i have code that takes a csharp datetime and converts it into a long to plot in the "flot" graph. here is the code public static long GetJavascriptTimestamp(DateTime input) { TimeSpan span = new TimeSpan(DateTime.Parse("1/1/1970").Ticks); DateTime time = input.Subtract(span); return (long)(time.Ticks / 10000); } I now need an opposite function where i take this long value and get the csharp datetime object back. any idea if the above method can be reversed ?

    Read the article

  • How to enforce this constraint in sql server

    - by Jeremy
    I have a table called city, and a table called city_city. city_city correlates two city records, so it has a fromcity_id and a tocity_id. I can enforce uniqueness on fromcity_id and and tocity_id through a unique key, but how do I enforce uniqueness so that I cant insert a record if fromcity_id and tocity_id are reversed. For example, the following records are conceptually the same: id fromcity_id tocity_id 1 100 200 2 200 100

    Read the article

  • Fill a FlowLayoutPanel

    - by serhio
    I have a UserControl in which a FlowLayoutPanel. This user control consist of a description and some controls: [descr.] 123456789, it should be able to be reversed 987654321 [descr.] So FlowLayoutPanel is used for this scope(RightToLeft - True/False). Is this a way that the label1 fill the rest of the control(to left or right respectively)?

    Read the article

  • How to reverse items in WPF Datagrid?

    - by irf1x
    If i have DataGrid which looks like: Col 1 Col 2 ------- ------- 1 a 2 b 3 c ... ... n n Can the order be reversed easily without sorting? So that n is first, and 1 is last. I have custom sort implemented from this article, but sorting the same column twice in a row calls sorting function twice (which is slow), so just reversing the order should be faster and have the same effect.

    Read the article

  • Dock=>Fill a control in FlowLayoutPanel

    - by serhio
    I have a UserControl in which a FlowLayoutPanel. This user control consist of a description and some controls: [descr.] 123456789, it should be able to be reversed 987654321 [descr.] So FlowLayoutPanel is used for this scope(RightToLeft - True/False). Is this a way that the label1 fill the rest of the control(to left or right respectively)?

    Read the article

  • Play animation (storyboard) backwards

    - by drasto
    Is there a simple way to play some StoryBoad backward (reversed) ? As there is a method Storyboard.Begin() I would expect that there is some method like "Storyboard.BeginReversed()" but I cannot find it. If there is no way to play an animation backwards that I have to write for most of my animations complementary animations. That smells bad to me (code duplication of some kind). Basically I just animate a Grid that shows and than hides.

    Read the article

  • Problem with Closure properties of context free languages

    - by altius
    hello i have the following sentence a language L1={a^n * b^n : n=0} and L2={b^n * a^n : n=0} are context free languages so they are close a=under the L1L2 so L={a^n * b^2n A^n : n=0} must be context free too because it is generated by a close property I have to prove if this sentence is true or not so i check the L language and i do not think that it is context free then i also saw that L2 is L1 reversed do i have to check if L1, L2 are deterministic ? please help because i am in a dead end

    Read the article

  • Tips for documenting a web application?

    - by Pandiya Chendur
    I know that I can take my asp.net application and get it reversed to a UML document, but that doesn't tell the whole story of things like who can use what, what it calls in the way of stored procedures, what pages call what pages etc. etc. Does anyone know of an article where someone has a comprehensive way to document a web application/site? Or shall I just make up my own way?

    Read the article

  • Legally Blind and need help creating a windows mobile 6.1 theme

    - by unknown (yahoo)
    Hello, I just bought an HTC Touch Pro2. I previously have used a MotoQ. On the Q, I managed to write XML code to change my color scheme (not just the bars, but the background color and font colors.) I cannot seem to find how to do this on the HTC. I will explain: I am legally blind and can only see my phone if the colors are reversed i.e. I need the background of all menus and such to be black and the font to be white. Can anyone help me? I am a desperate woman!!!!

    Read the article

  • Choosing what logwatch is reporting on, on Centos 5.4

    - by florin
    I have two Centos 5.4 servers that I set up within weeks of each other. One is e-mail server (let's label it EM) and the other is a web and ftp server (labeled WF). Logwatch came pre-configured and I have not altered its setup in any way -- but the log messages are quite different between the two: server EM reports ssh status while WF does not. With ntpd, the situation is reversed. I know I could start tweaking some knobs in /etc/logwatch and somesuch, but why are the results from the default configuration so different?

    Read the article

  • Non-printing characters in Word 2011 not showing even when enabled

    - by Henrik Söderlund
    I have a document I work on often, my resume. I have created a few different styles that I use and for some reason the non-printing characters have stopped showing properly. I have the option enabled (the reversed P) and the proper settings in the preferences checked. Here is a screenshot of the current view: basically, only the tab stops and the returns are showing. Upon doing an experiment by creating a new document, all characters (especially the spaces) show up nicely: I can copy this line and paste it into my resume document and it shows up there too. It seems my styles are doing something...

    Read the article

  • Meetings Disappearing from Outlook 2010 Public Calendar

    - by Neil
    We are experiencing a frustrating issue with our Public Calendars in Outlook 2010. Meetings that have been scheduled months in advance are missing, but will then reappear. If user A logs in @ 9:30 and goes to the calendar, certain meetings will be missing. 15 Minutes later, when user B logs in, the meetings are there. It is not tied to the actual user- I have seen this issue occur with the order of logging in reversed. These are with meetings that were posted to the calender months ago, so it should not be an issue of an item being updated. We have not upgraded our Exchange environment (still running on 2003), but this is a new machine, running Windows 7 Professional, on a domain, running office 2010. Are there any quirks or settings that I am missing or not aware of?

    Read the article

  • Should I replace libapache2-mod-php5-filter with libapache2-mod-php5 on Debian 6 Apache 2.2.16?

    - by luison
    Upgrading various virtual machines we are having an issue with the Debian package upgrade to version 2.2.16 The upgrade (surprisingly) seems to remove libapache2-mod-php5 replacing it with libapache2-mod-php5-filter. This gave us some headache as the php.ini was pointing to the "old" one and some of the apache.conf conditional module rules stopped working. We can fix all those but we can't figure out if there would be any issues if we just "reversed" this and simply install libapache2-mod-php5 again and load that module instead of the "filter" one or in there is anyway to "alias" a module. I tend to think that the change "has a reason" but after reading apache2 and php5: module or filter I understand the module differences are to do with post delivery security issues.

    Read the article

  • ScreenShare: command line and observe only.

    - by Shyam
    Hi, I have a wide TV screen that is attached to a Mac Mini. I am able to use this screen as a second screen using an application like ScreenRecycler. However, Sometimes I want to demonstrate what I am doing on my box on this TV screen. As this TV is attached to a Mac Mini, I want to have a screen sharing done reversed. As I know screen share can be done in observe mode and full screen, this would be more than sufficient. Because it would be pretty useless to run it continuously, I want it on demand. For this, I want to use SSH. So the only thing I would like to know is, how do I start screen sharing in from a Terminal Session. On Windows, I could start an application by using "start notepad.exe", I am looking for something similar. Eventually, I want to make this work on other boxes too. Thanks for your help!

    Read the article

  • VMWare Player 5.0 Upgrade - Bridged Networking No Longer Works

    - by Syndog
    I've been using VMWare Player 4 on my Windows 7 PC, running my VMs under a bridged networking configuration without any problem. I settled on bridged networking two reasons... I often use VMs to host web applications for test purposes. I never could get NAT to work for me anyway, but no love lost, considering reason #1. Now that I've upgraded to VMWare Player 5, the situation has completely reversed. In other words, bridged networking no longer works at all, and NAT does. Has anyone else come across this? Any ideas on getting bridged networking to work again? This happens with both Windows and Linux guest OSes. VMWare Tools has been fully updated. I've tried the usual vmnetcfg.exe utility fix, to no avail.

    Read the article

  • Python — Time complexity of built-in functions versus manually-built functions in finite fields

    - by stackuser
    Generally, I'm wondering about the advantages versus disadvantages of using the built-in arithmetic functions versus rolling your own in Python. Specifically, I'm taking in GF(2) finite field polynomials in string format, converting to base 2 values, performing arithmetic, then output back into polynomials as string format. So a small example of this is in multiplication: Rolling my own: def multiply(a,b): bitsa = reversed("{0:b}".format(a)) g = [(b<<i)*int(bit) for i,bit in enumerate(bitsa)] return reduce(lambda x,y: x+y,g) Versus the built-in: def multiply(a,b): # a,b are GF(2) polynomials in binary form .... return a*b #returns product of 2 polynomials in gf2 Currently, operations like multiplicative inverse (with for example 20 bit exponents) take a long time to run in my program as it's using all of Python's built-in mathematical operations like // floor division and % modulus, etc. as opposed to making my own division, remainder, etc. I'm wondering how much of a gain in efficiency and performance I can get by building these manually (as shown above). I realize the gains are dependent on how well the manual versions are built, that's not the question. I'd like to find out 'basically' how much advantage there is over the built-in's. So for instance, if multiplication (as in the example above) is well-suited for base 10 (decimal) arithmetic but has to jump through more hoops to change bases to binary and then even more hoops in operating (so it's lower efficiency), that's what I'm wondering. Like, I'm wondering if it's possible to bring the time down significantly by building them myself in ways that maybe some professionals here have already come across.

    Read the article

  • C string question

    - by user208454
    I am writing a simple c program which reverses a string, taking the string from argv[1]. Here is the code: #include <stdio.h> #include <stdlib.h> #include <string.h> char* flip_string(char *string){ int i = strlen(string); int j = 0; // Doesn't really matter all I wanted was the same size string for temp. char* temp = string; puts("This is the original string"); puts(string); puts("This is the \"temp\" string"); puts(temp); for(i; i>=0; i--){ temp[j] = string[i] if (j <= strlen(string)) { j++; } } return(temp); } int main(int argc, char *argv[]){ puts(flip_string(argv[1])); printf("This is the end of the program\n"); } That's basically it, the program compiles and everything but does not return the temp string in the end (just blank space). In the beginning it prints temp fine when its equal to string. Furthermore if I do a character by character printf of temp in the for loop the correct temp string in printed i.e. string - reversed. just when I try to print it to standard out (after the for loop/ or in the main) nothing happens only blank space is printed.

    Read the article

  • Stack Trace Logger [migrated]

    - by Chris Okyen
    I need to write a parent Java class that classes using recursion can extend. The parent class will be be able to realize whenever the call stack changes ( you enter a method, temporarily leave it to go to another method call, or you are are finsihed with the method ) and then print it out. I want it to print on the console, but clear the console as well every time so it shows the stack horizantaly so you can see the height of each stack to see what popped off and what popped on... Also print out if a baseline was reached for recursive functions. First. How can I using the StackTraceElements and Thread classes to detect automatically whenever the stack has popped or pushed an element on without calling it manually? Second, how would I do the clearing thing? For instance , if I had the code: public class recursion(int i) { private static void recursion(int i) { if( i < 10) System.out.println('A'); else { recursion(i / 10 ); System.out.println('B'); } } public static void main(String[] argv) { recursion(102); } } It would need to print out the stack when entering main(), when entering recursion(102) from main(), when it enters recursion(102 / 10), which is recursion(10), from recursion(102), when it enters recursion(10 / 10), which is recursion(1) from recursion(10). Print out a message out when it reaches the baseline recursion(1).. then print out the stacks of reversed revisitation of function recursion(10), recursion(102) and main(). finally print out we are exiting main().

    Read the article

  • Why do the order of uniforms gets changed by the compiler?

    - by Aybe
    I have the following shader, everything works fine when setting the value of one of the matrices but I've discovered that getting a value back is incorrect for View and Projection, they are in reverse order. #version 430 precision highp float; layout (location = 0) uniform mat4 Model; layout (location = 1) uniform mat4 View; layout (location = 2) uniform mat4 Projection; layout (location = 0) in vec3 in_position; layout (location = 1) in vec4 in_color; out vec4 out_color; void main(void) { gl_Position = Projection * View * Model * vec4(in_position, 1.0); out_color = in_color; } When querying their location they are effectively reversed, I did a small test by renaming View to Piew which puts it before Projection if sorted alphabetically and the order is correct. Now if I do remove layout (location = ...) from the uniforms, the problem disappears !? I am starting to think that this is a driver bug as explained in the wiki. Do you know why the order of the uniforms is changed whenever the shader is compiled ? (using an AMD HD7850)

    Read the article

  • Why is an anemic domain model considered bad in C#/OOP, but very important in F#/FP?

    - by Danny Tuppeny
    In a blog post on F# for fun and profit, it says: In a functional design, it is very important to separate behavior from data. The data types are simple and "dumb". And then separately, you have a number of functions that act on those data types. This is the exact opposite of an object-oriented design, where behavior and data are meant to be combined. After all, that's exactly what a class is. In a truly object-oriented design in fact, you should have nothing but behavior -- the data is private and can only be accessed via methods. In fact, in OOD, not having enough behavior around a data type is considered a Bad Thing, and even has a name: the "anemic domain model". Given that in C# we seem to keep borrowing from F#, and trying to write more functional-style code; how come we're not borrowing the idea of separating data/behavior, and even consider it bad? Is it simply that the definition doesn't with with OOP, or is there a concrete reason that it's bad in C# that for some reason doesn't apply in F# (and in fact, is reversed)? (Note: I'm specifically interested in the differences in C#/F# that could change the opinion of what is good/bad, rather than individuals that may disagree with either opinion in the blog post).

    Read the article

  • How will closures in Java impact the Java Community?

    - by Ryan Delucchi
    It is one of the most talked about features planned for Java: Closures. Many of us have been longing for them. Some of us (including I) have grown a bit impatient and have turned to scripting languages to fill the void. But, once closures have finally arrived to Java: how will they effect the Java Community? Will the advancement of VM-targetted scripting languages slow to a crawl, stay the same, or acclerate? Will people flock to the new closure syntax, thus turning Java code-bases all-around into more functionally structured implementations? Will we only see closures sprinkled in Java throughout? What will be the effect on tool/IDE support? How about performance? And finally, what will it mean for Java's continued adoption, as a language, compared with other languages that are rising in popularity? To provide an example of one of the latest proposed Java Closure syntax specs: public interface StringOperation { String invoke(String s); } // ... (new StringOperation() { public invoke(String s) { new StringBuilder(s).reverse().toString(); } }).invoke("abcd"); would become ... String reversed = { String s => new StringBuilder(s).reverse().toString() }.invoke("abcd"); [source: http://tronicek.blogspot.com/2007/12/closures-closure-is-form-of-anonymous_28.html]

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >