Search Results

Search found 2181 results on 88 pages for 'dim fish'.

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

  • $PATH is driving me nuts

    - by Chris4d
    OK, apologies if this is something dumb, but I'm running out of ideas. Goal: prepend /usr/local/bin to $PATH Problem: $PATH won't do what I want or expect How I got here: I want to start learning to program, so I'm getting comfortable messing around under the hood, but don't have a lot of experience. I installed the fish shell (because it's friendly!) using homebrew and set it as my default shell (under system prefs>users & groups>advanced). At some point, I ran brew doctor to see if my installs were all kosher, and it suggested I move /usr/local/bin to the front of $PATH so that I could use my installation of git rather than the system copy. Fine - but between path_helper and fish, something was happening to $PATH that was out of my control, and I could never get the paths arranged in the right way. Environment: OSX 10.8.2, upgraded from 10.7ish, with xcode and devtools installed, plus x11, homebrew, and fish More info: I've set my user's default shell back to bash, and tried a variety of shells thru terminal.app - bash, fish, sh. I moved /usr/local/bin to the top of /etc/paths but it didn't change anything. I looked thru the various config.fish files and commented out stuff that might mess with $PATH, didn't help. I have the following files in /etc/paths.d/: ./10-homebrew containing /usr/local/bin ./20-fish containing /usr/local/Cellar/fish/1.23.1/bin ./40-XQuartz containing /opt/X11/bin I added set +x to my profile and when I start terminal.app I get: Last login: Mon Oct 1 13:31:06 on ttys000 + '[' -x /usr/libexec/path_helper ']' + eval '/usr/libexec/path_helper -s' ++ /usr/libexec/path_helper -s PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/fish/1.23.1/bin:/opt/X11/bin"; export PATH; + '[' /bin/bash '!=' no ']' + '[' -r /etc/bashrc ']' + . /etc/bashrc ++ '[' -z '\s-\v\$ ' ']' ++ PS1='\h:\W \u\$ ' ++ shopt -s checkwinsize ++ '[' Apple_Terminal == Apple_Terminal ']' ++ '[' -z '' ']' ++ PROMPT_COMMAND='update_terminal_cwd; ' ++ update_terminal_cwd ++ local 'SEARCH= ' ++ local REPLACE=%20 ++ local PWD_URL=file://Chriss-iMac.local/Users/c4 ++ printf '\e]7;%s\a' file://Chriss-iMac.local/Users/c4 Chriss-iMac:~ c4$ So it looks like path_helper runs, but then running echo $PATH nets me /usr/bin:/bin:/usr/sbin:/sbin. So, it looks like path_helper isn't even doing what it's supposed to anymore? I'm sure there is some well-defined behavior here that I don't understand, or I borked something while trying to fix it. Please help!

    Read the article

  • Way to dim outside windows / Turn the lights feature

    - by droidgren
    I am looking for a way to replicate the "Dim out" or "Turn the lights off" feature (that can be seen on various video sites on the web) into Windows ? This will darken (dim out) the active window. It could be a windows shell extension/plugin or a video player plugin that has this feature. The reason for I am looking for this is that I have a rather large monitor and doesn't use the whole screen when watching movies.

    Read the article

  • Scripting Windows Shares - VBS

    - by Calvin Piche
    So i am totally new to VBS, never used it. I am trying to create multiple shares and i found a Microsoft VBS script that can do this(http://gallery.technet.microsoft.com/scriptcenter/6309d93b-fcc3-4586-b102-a71415244712) My question is, this script only allows for one domain group or user to be added for permissions where i am needing to add a couple with different permissions(got that figured out) Below is the script that i have modified for my needs but just need to add in the second group with the other permissions. If there is an easier way to do this please let me know. 'ShareSetup.vbs '========================================================================== Option Explicit Const FILE_SHARE = 0 Const MAXIMUM_CONNECTIONS = 25 Dim strComputer Dim objWMIService Dim objNewShare strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objNewShare = objWMIService.Get("Win32_Share") Call sharesec ("C:\Published Apps\Logs01", "Logs01", "Log01", "Support") Call sharesec2 ("C:\Published Apps\Logs01", "Logs01", "Log01", "Domain Admins") Sub sharesec(Fname,shr,info,account) 'Fname = Folder path, shr = Share name, info = Share Description, account = account or group you are assigning share permissions to Dim FSO Dim Services Dim SecDescClass Dim SecDesc Dim Trustee Dim ACE Dim Share Dim InParam Dim Network Dim FolderName Dim AdminServer Dim ShareName FolderName = Fname AdminServer = "\\" & strComputer ShareName = shr Set Services = GetObject("WINMGMTS:{impersonationLevel=impersonate,(Security)}!" & AdminServer & "\ROOT\CIMV2") Set SecDescClass = Services.Get("Win32_SecurityDescriptor") Set SecDesc = SecDescClass.SpawnInstance_() 'Set Trustee = Services.Get("Win32_Trustee").SpawnInstance_ 'Trustee.Domain = Null 'Trustee.Name = "EVERYONE" 'Trustee.Properties_.Item("SID") = Array(1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0) Set Trustee = SetGroupTrustee("domain", account) 'Replace ACME with your domain name. 'To assign permissions to individual accounts use SetAccountTrustee rather than SetGroupTrustee Set ACE = Services.Get("Win32_Ace").SpawnInstance_ ACE.Properties_.Item("AccessMask") = 1179817 ACE.Properties_.Item("AceFlags") = 3 ACE.Properties_.Item("AceType") = 0 ACE.Properties_.Item("Trustee") = Trustee SecDesc.Properties_.Item("DACL") = Array(ACE) Set Share = Services.Get("Win32_Share") Set InParam = Share.Methods_("Create").InParameters.SpawnInstance_() InParam.Properties_.Item("Access") = SecDesc InParam.Properties_.Item("Description") = "Public Share" InParam.Properties_.Item("Name") = ShareName InParam.Properties_.Item("Path") = FolderName InParam.Properties_.Item("Type") = 0 Share.ExecMethod_ "Create", InParam End Sub Sub sharesec2(Fname,shr,info,account) 'Fname = Folder path, shr = Share name, info = Share Description, account = account or group you are assigning share permissions to Dim FSO Dim Services Dim SecDescClass Dim SecDesc Dim Trustee Dim ACE2 Dim Share Dim InParam Dim Network Dim FolderName Dim AdminServer Dim ShareName FolderName = Fname AdminServer = "\\" & strComputer ShareName = shr Set Services = GetObject("WINMGMTS:{impersonationLevel=impersonate,(Security)}!" & AdminServer & "\ROOT\CIMV2") Set SecDescClass = Services.Get("Win32_SecurityDescriptor") Set SecDesc = SecDescClass.SpawnInstance_() 'Set Trustee = Services.Get("Win32_Trustee").SpawnInstance_ 'Trustee.Domain = Null 'Trustee.Name = "EVERYONE" 'Trustee.Properties_.Item("SID") = Array(1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0) Set Trustee = SetGroupTrustee("domain", account) 'Replace ACME with your domain name. 'To assign permissions to individual accounts use SetAccountTrustee rather than SetGroupTrustee Set ACE2 = Services.Get("Win32_Ace").SpawnInstance_ ACE2.Properties_.Item("AccessMask") = 1179817 ACE2.Properties_.Item("AceFlags") = 3 ACE2.Properties_.Item("AceType") = 0 ACE2.Properties_.Item("Trustee") = Trustee SecDesc.Properties_.Item("DACL") = Array(ACE2) End Sub Function SetAccountTrustee(strDomain, strName) set objTrustee = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_Trustee").Spawninstance_ set account = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_Account.Name='" & strName & "',Domain='" & strDomain &"'") set accountSID = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_SID.SID='" & account.SID &"'") objTrustee.Domain = strDomain objTrustee.Name = strName objTrustee.Properties_.item("SID") = accountSID.BinaryRepresentation set accountSID = nothing set account = nothing set SetAccountTrustee = objTrustee End Function Function SetGroupTrustee(strDomain, strName) Dim objTrustee Dim account Dim accountSID set objTrustee = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_Trustee").Spawninstance_ set account = getObject("Winmgmts:{impersonationlevel=impersonate}!root/cimv2:Win32_Group.Name='" & strName & "',Domain='" & strDomain &"'") set accountSID = getObject("Winmgmts: {impersonationlevel=impersonate}!root/cimv2:Win32_SID.SID='" & account.SID &"'") objTrustee.Domain = strDomain objTrustee.Name = strName objTrustee.Properties_.item("SID") = accountSID.BinaryRepresentation set accountSID = nothing set account = nothing set SetGroupTrustee = objTrustee End Function

    Read the article

  • Is fish or zsh better for shell programming?

    - by Julien Nicoulaud
    I'm a bash user willing to switch to a more friendly and advanced shell. I read a lot of good things about zsh, but I gave a quick test at fish and it seems great too. Both seem very close in term of features, what is your opinion about those two shells especially as regards shell programming?

    Read the article

  • How to obtain a random sub-datatable from another data table

    - by developerit
    Introduction In this article, I’ll show how to get a random subset of data from a DataTable. This is useful when you already have queries that are filtered correctly but returns all the rows. Analysis I came across this situation when I wanted to display a random tag cloud. I already had the query to get the keywords ordered by number of clicks and I wanted to created a tag cloud. Tags that are the most popular should have more chance to get picked and should be displayed larger than less popular ones. Implementation In this code snippet, there is everything you need. ' Min size, in pixel for the tag Private Const MIN_FONT_SIZE As Integer = 9 ' Max size, in pixel for the tag Private Const MAX_FONT_SIZE As Integer = 14 ' Basic function that retreives Tags from a DataBase Public Shared Function GetTags() As MediasTagsDataTable ' Simple call to the TableAdapter, to get the Tags ordered by number of clicks Dim dt As MediasTagsDataTable = taMediasTags.GetDataValide ' If the query returned no result, return an empty DataTable If dt Is Nothing OrElse dt.Rows.Count < 1 Then Return New MediasTagsDataTable End If ' Set the font-size of the group of data ' We are dividing our results into sub set, according to their number of clicks ' Example: 10 results -> [0,2] will get font size 9, [3,5] will get font size 10, [6,8] wil get 11, ... ' This is the number of elements in one group Dim groupLenth As Integer = CType(Math.Floor(dt.Rows.Count / (MAX_FONT_SIZE - MIN_FONT_SIZE)), Integer) ' Counter of elements in the same group Dim counter As Integer = 0 ' Counter of groups Dim groupCounter As Integer = 0 ' Loop througt the list For Each row As MediasTagsRow In dt ' Set the font-size in a custom column row.c_FontSize = MIN_FONT_SIZE + groupCounter ' Increment the counter counter += 1 ' If the group counter is less than the counter If groupLenth <= counter Then ' Start a new group counter = 0 groupCounter += 1 End If Next ' Return the new DataTable with font-size Return dt End Function ' Function that generate the random sub set Public Shared Function GetRandomSampleTags(ByVal KeyCount As Integer) As MediasTagsDataTable ' Get the data Dim dt As MediasTagsDataTable = GetTags() ' Create a new DataTable that will contains the random set Dim rep As MediasTagsDataTable = New MediasTagsDataTable ' Count the number of row in the new DataTable Dim count As Integer = 0 ' Random number generator Dim rand As New Random() While count < KeyCount Randomize() ' Pick a random row Dim r As Integer = rand.Next(0, dt.Rows.Count - 1) Dim tmpRow As MediasTagsRow = dt(r) ' Import it into the new DataTable rep.ImportRow(tmpRow) ' Remove it from the old one, to be sure not to pick it again dt.Rows.RemoveAt(r) ' Increment the counter count += 1 End While ' Return the new sub set Return rep End Function Pro’s This method is good because it doesn’t require much work to get it work fast. It is a good concept when you are working with small tables, let says less than 100 records. Con’s If you have more than 100 records, out of memory exception may occur since we are coping and duplicating rows. I would consider using a stored procedure instead.

    Read the article

  • Firefox addin to "dim" a page

    - by Sean
    Hi, this is simple - I have a page opened all the time in FF, and don't want others passing by to see immediately the page. Is there a plugin that would allow to "dim" the page, unless you over it with a mouse or set focus on window? The idea is similar to laptops screen dimming. Thanks.

    Read the article

  • AD Password About to Expire check problem with ASP.Net

    - by Vince
    Hello everyone, I am trying to write some code to check the AD password age during a user login and notify them of the 15 remaining days. I am using the ASP.Net code that I found on the Microsoft MSDN site and I managed to add a function that checks the if the account is set to change password at next login. The login and the change password at next login works great but I am having some problems with the check for the password age. This is the VB.Net code for the DLL file: Imports System Imports System.Text Imports System.Collections Imports System.DirectoryServices Imports System.DirectoryServices.AccountManagement Imports System.Reflection 'Needed by the Password Expiration Class Only -Vince Namespace FormsAuth Public Class LdapAuthentication Dim _path As String Dim _filterAttribute As String 'Code added for the password expiration added by Vince Private _domain As DirectoryEntry Private _passwordAge As TimeSpan = TimeSpan.MinValue Const UF_DONT_EXPIRE_PASSWD As Integer = &H10000 'Function added by Vince Public Sub New() Dim root As New DirectoryEntry("LDAP://rootDSE") root.AuthenticationType = AuthenticationTypes.Secure _domain = New DirectoryEntry("LDAP://" & root.Properties("defaultNamingContext")(0).ToString()) _domain.AuthenticationType = AuthenticationTypes.Secure End Sub 'Function added by Vince Public ReadOnly Property PasswordAge() As TimeSpan Get If _passwordAge = TimeSpan.MinValue Then Dim ldate As Long = LongFromLargeInteger(_domain.Properties("maxPwdAge")(0)) _passwordAge = TimeSpan.FromTicks(ldate) End If Return _passwordAge End Get End Property Public Sub New(ByVal path As String) _path = path End Sub 'Function added by Vince Public Function DoesUserHaveToChangePassword(ByVal userName As String) As Boolean Dim ctx As PrincipalContext = New PrincipalContext(System.DirectoryServices.AccountManagement.ContextType.Domain) Dim up = UserPrincipal.FindByIdentity(ctx, userName) Return (Not up.LastPasswordSet.HasValue) 'returns true if last password set has no value. End Function Public Function IsAuthenticated(ByVal domain As String, ByVal username As String, ByVal pwd As String) As Boolean Dim domainAndUsername As String = domain & "\" & username Dim entry As DirectoryEntry = New DirectoryEntry(_path, domainAndUsername, pwd) Try 'Bind to the native AdsObject to force authentication. Dim obj As Object = entry.NativeObject Dim search As DirectorySearcher = New DirectorySearcher(entry) search.Filter = "(SAMAccountName=" & username & ")" search.PropertiesToLoad.Add("cn") Dim result As SearchResult = search.FindOne() If (result Is Nothing) Then Return False End If 'Update the new path to the user in the directory. _path = result.Path _filterAttribute = CType(result.Properties("cn")(0), String) Catch ex As Exception Throw New Exception("Error authenticating user. " & ex.Message) End Try Return True End Function Public Function GetGroups() As String Dim search As DirectorySearcher = New DirectorySearcher(_path) search.Filter = "(cn=" & _filterAttribute & ")" search.PropertiesToLoad.Add("memberOf") Dim groupNames As StringBuilder = New StringBuilder() Try Dim result As SearchResult = search.FindOne() Dim propertyCount As Integer = result.Properties("memberOf").Count Dim dn As String Dim equalsIndex, commaIndex Dim propertyCounter As Integer For propertyCounter = 0 To propertyCount - 1 dn = CType(result.Properties("memberOf")(propertyCounter), String) equalsIndex = dn.IndexOf("=", 1) commaIndex = dn.IndexOf(",", 1) If (equalsIndex = -1) Then Return Nothing End If groupNames.Append(dn.Substring((equalsIndex + 1), (commaIndex - equalsIndex) - 1)) groupNames.Append("|") Next Catch ex As Exception Throw New Exception("Error obtaining group names. " & ex.Message) End Try Return groupNames.ToString() End Function 'Function added by Vince Public Function WhenExpires(ByVal username As String) As TimeSpan Dim ds As New DirectorySearcher(_domain) ds.Filter = [String].Format("(&(objectClass=user)(objectCategory=person)(sAMAccountName={0}))", username) Dim sr As SearchResult = FindOne(ds) Dim user As DirectoryEntry = sr.GetDirectoryEntry() Dim flags As Integer = CInt(user.Properties("userAccountControl").Value) If Convert.ToBoolean(flags And UF_DONT_EXPIRE_PASSWD) Then 'password never expires Return TimeSpan.MaxValue End If 'get when they last set their password Dim pwdLastSet As DateTime = DateTime.FromFileTime(LongFromLargeInteger(user.Properties("pwdLastSet").Value)) ' return pwdLastSet.Add(PasswordAge).Subtract(DateTime.Now); If pwdLastSet.Subtract(PasswordAge).CompareTo(DateTime.Now) > 0 Then Return pwdLastSet.Subtract(PasswordAge).Subtract(DateTime.Now) Else Return TimeSpan.MinValue 'already expired End If End Function 'Function added by Vince Private Function LongFromLargeInteger(ByVal largeInteger As Object) As Long Dim type As System.Type = largeInteger.[GetType]() Dim highPart As Integer = CInt(type.InvokeMember("HighPart", BindingFlags.GetProperty, Nothing, largeInteger, Nothing)) Dim lowPart As Integer = CInt(type.InvokeMember("LowPart", BindingFlags.GetProperty, Nothing, largeInteger, Nothing)) Return CLng(highPart) << 32 Or CUInt(lowPart) End Function 'Function added by Vince Private Function FindOne(ByVal searcher As DirectorySearcher) As SearchResult Dim sr As SearchResult = Nothing Dim src As SearchResultCollection = searcher.FindAll() If src.Count > 0 Then sr = src(0) End If src.Dispose() Return sr End Function End Class End Namespace And this is the Login.aspx page: sub Login_Click(sender as object,e as EventArgs) Dim adPath As String = "LDAP://DC=xxx,DC=com" 'Path to your LDAP directory server Dim adAuth As LdapAuthentication = New LdapAuthentication(adPath) Try If (True = adAuth.DoesUserHaveToChangePassword(txtUsername.Text)) Then Response.Redirect("passchange.htm") ElseIf (True = adAuth.IsAuthenticated(txtDomain.Text, txtUsername.Text, txtPassword.Text)) Then Dim groups As String = adAuth.GetGroups() 'Create the ticket, and add the groups. Dim isCookiePersistent As Boolean = chkPersist.Checked Dim authTicket As FormsAuthenticationTicket = New FormsAuthenticationTicket(1, _ txtUsername.Text, DateTime.Now, DateTime.Now.AddMinutes(60), isCookiePersistent, groups) 'Encrypt the ticket. Dim encryptedTicket As String = FormsAuthentication.Encrypt(authTicket) 'Create a cookie, and then add the encrypted ticket to the cookie as data. Dim authCookie As HttpCookie = New HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket) If (isCookiePersistent = True) Then authCookie.Expires = authTicket.Expiration End If 'Add the cookie to the outgoing cookies collection. Response.Cookies.Add(authCookie) 'Retrieve the password life Dim t As TimeSpan = adAuth.WhenExpires(txtUsername.Text) 'You can redirect now. If (passAge.Days = 90) Then errorLabel.Text = "Your password will expire in " & DateTime.Now.Subtract(t) 'errorLabel.Text = "This is" 'System.Threading.Thread.Sleep(5000) Response.Redirect("http://somepage.aspx") Else Response.Redirect(FormsAuthentication.GetRedirectUrl(txtUsername.Text, False)) End If Else errorLabel.Text = "Authentication did not succeed. Check user name and password." End If Catch ex As Exception errorLabel.Text = "Error authenticating. " & ex.Message End Try End Sub ` Every time I have this Dim t As TimeSpan = adAuth.WhenExpires(txtUsername.Text) enabled, I receive "Arithmetic operation resulted in an overflow." during the login and won't continue. What am I doing wrong? How can I correct this? Please help!! Thank you very much for any help in advance. Vince

    Read the article

  • Screen gets stuck in a dim setting after waking up

    - by Mason Wheeler
    I've got a laptop that I recently upgraded from Vista to Windows 7. It works a lot better now for a lot of things, but there's one problem I've had happen a few times that never happened under Vista. When I put the system to sleep, then occasionally when I wake it up again, for no apparent reason, the screen's dim. Sometimes it's as if half the backlighting was turned off, and sometimes it's as if all the backlighting was turned off, all except for the mouse pointer, which remains as bright white as ever. Trying to change the screen's brightness does nothing, but rebooting fixes this. Has anyone else seen this? Any ideas on what's causing it or how to make it stop happening?

    Read the article

  • Screen gets stuck in a dim setting after waking up

    - by Mason Wheeler
    I've got a laptop that I recently upgraded from Vista to Windows 7. It works a lot better now for a lot of things, but there's one problem I've had happen a few times that never happened under Vista. When I put the system to sleep, then occasionally when I wake it up again, for no apparent reason, the screen's dim. Sometimes it's as if half the backlighting was turned off, and sometimes it's as if all the backlighting was turned off, all except for the mouse pointer, which remains as bright white as ever. Trying to change the screen's brightness does nothing, but rebooting fixes this. Has anyone else seen this? Any ideas on what's causing it or how to make it stop happening?

    Read the article

  • show popup from iframe and dim out background including parent page too

    - by amit
    hello guys, i m having a problem with popup, there is an iframe in my mainpage, which is containing some other page. i want to show popup from that containing page and make background dim. i m changing my mainpage styles like making it opacity .40 but thing is its getting applied to my popup too,,, my popup is also getting dim. what to do? i want to show popup clearly so that people gets attracted to popup

    Read the article

  • Accelerating 2d object collision with other objects [on hold]

    - by Silent Cave
    Making my very first attempt at game programming with SDL/OpenGL. So I made an object Actor witch can move in all four sides with acceleration. And there are bunch of other rectangles to collide to. the image Movement and collision detection alghorythms work just fine by itself, but when combined to prevent the green rectangle from crossing black rectangles, it gives me a kind of funny resault. Let me show you the code first: from Actor.h class Actor{ public: SDL_Rect * dim; alphaColor * col; float speed; float xlGrav, xrGrav, yuGrav, ydGrav; float acceleration; bool left,right,up,down; Actor(SDL_Rect * dim,alphaColor * col, float speed, float acceleration); bool colides(const SDL_Rect & rect); bool check_for_collisions(const std::vector<SDL_Rect*> & gameObjects ); }; from actor.cpp bool Actor::colides(const SDL_Rect & rect){ if (dim->x + dim->w < rect.x) return false; if (dim->x > rect.x + rect.w) return false; if (dim->y + dim->h < rect.y) return false; if (dim->y > rect.y + rect.h) return false; return true; } movement logic from main.cpp if (actor->left){ if(actor->xlGrav < actor->speed){ actor->xlGrav += actor->speed*actor->acceleration; }else actor->xlGrav = actor->speed; actor->dim->x -= actor->xlGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->x += actor->xlGrav; actor->xlGrav = 0; } } if (!actor->left){ if(actor->xlGrav - actor->speed*actor->acceleration > 0){ actor->xlGrav -= actor->speed*actor->acceleration; }else actor->xlGrav = 0; actor->dim->x -= actor->xlGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->x += actor->xlGrav; actor->xlGrav = 0; } } if (actor->right){ if(actor->xrGrav < actor->speed){ actor->xrGrav += actor->speed*actor->acceleration; }else actor->xrGrav = actor->speed; actor->dim->x += actor->xrGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->x -= actor->xrGrav; actor->xrGrav = 0; } } if (!actor->right){ if(actor->xrGrav - actor->speed*actor->acceleration > 0){ actor->xrGrav -= actor->speed*actor->acceleration; }else actor->xrGrav = 0; actor->dim->x += actor->xrGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->x -= actor->xrGrav; actor->xrGrav = 0; } } if (actor->up){ if(actor->yuGrav < actor->speed){ actor->yuGrav += actor->speed*actor->acceleration; }else actor->yuGrav = actor->speed; actor->dim->y -= actor->yuGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->y += actor->yuGrav; actor->yuGrav = 0; } } if (!actor->up){ if(actor->yuGrav - actor->speed*actor->acceleration > 0){ actor->yuGrav -= actor->speed*actor->acceleration; }else actor->yuGrav = 0; actor->dim->y -= actor->yuGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->y += actor->yuGrav; actor->yuGrav = 0; } } if (actor->down){ if(actor->ydGrav < actor->speed){ actor->ydGrav += actor->speed*actor->acceleration; }else actor->ydGrav = actor->speed; actor->dim->y += actor->ydGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->y -= actor->ydGrav; actor->ydGrav = 0; } } if (!actor->down){ if(actor->ydGrav - actor->speed*actor->acceleration > 0){ actor->ydGrav -= actor->speed*actor->acceleration; }else actor->ydGrav = 0; actor->dim->y += actor->ydGrav; if(actor->check_for_collisions(gameObjects)){ actor->dim->y -= actor->ydGrav; actor->ydGrav = 0; } } So, if the green box approaches an obstacle from up or left, everything goes as planned - object stops, and it's acceleration drops to zero. But if it comes from bottom or right, it enters into obstacles inner space and starts strangely dance, I'd rather say move in inverted controls. What do I fail to see?

    Read the article

  • Was a Big Fish in a Little Pond, Am Now a Little Fish in a Big Pond. How Do I Grow? [closed]

    - by Ziv
    I've finished high school where I was in the top three in my class, I studied a little and there too I was pretty much Big Fish in a bigger pond than high school. Now I got into my first job in a very big company, there are some incredibly talented programmers and researchers here (mostly in departments not related to mine) and for the first time I really feel like I'm incredibly average - I do not want to be average. I read technical books all the time, I try to code on my personal time but I don't feel like that's enough. What can I do to become a leading programmer again in this big company? Is there anything specifically that can be done to make myself known here? This is a very big company so in order to advance you must be very good and shine in your field.

    Read the article

  • Ikoula offre 40 Go d'espace de sauvegarde pour toute souscription à son serveur Web dédié Green Fish

    Ikoula offre 40 Go d'espace de sauvegarde Pour toute souscription à son serveur Web dédié Green Fish En novembre dernier, Ikoula lançait une nouvelle gamme de serveurs Web dédiés à partir de 24 Euros par mois. Une offre d'entrée de gamme bien pensée, baptisée « Green Fish », qui vise particulièrement les développeurs à la recherche d'un serveur dédié à peu de frais avec un bon rapport qualité prix (lire par ailleurs). Aujourd'hui, pour continuer à promouvoir ce nouveau produit, Ikoula offre 40 Go d'espace de sauvegarde pour toute nouvelle souscription. Cette promotion est sans aucun engagemen...

    Read the article

  • Highlight DIV and dim the rest on mouseover

    - by Darren Sweeney
    I have a page full of DIVs which contain images. When I mouse over an image I can highlight it or add a shadow to accent it easily by adding class etc but is there a way to dim every other image instead. DIVs are loaded into DOM and I would like the DIV currently hovered over to retain 100% or 1 opacity and the rest of the DIVs on the page to fade to say 70% or 0.7 when one DIV is highlighted. Is this possible?

    Read the article

  • Visual basic 6.0 - ComputeHash invalid procedure call or argument error

    - by Mohan Babu Vijaya Gopal
    I am getting the error "invalid procedure call or arguments" at the step computeHash(). Any help highly appreciated. Private Sub Form_Load() Dim rngcsp As New RNGCryptoServiceProvider '= new RNGCryptoServiceProvider() Dim u8 As Encoding 'u8 = Encoding.UTF8 Dim minSaltSize As Integer Dim maxSaltSize As Integer Dim saltSize As Integer minSaltSize = 4 maxSaltSize = 8 Dim randm As Random Set randm = New Random Dim saltBytes() As Byte ReDim saltBytes(saltSize) Set rngcsp = New RNGCryptoServiceProvider rngcsp.GetNonZeroBytes (saltBytes) Dim plainTextBytes() As Byte plainTextBytes() = ConvertStringToUtf8Bytes("Mohan") Dim plainTextBytesLen As Long plainTextBytesLen = UBound(plainTextBytes) - LBound(plainTextBytes) + 1 Dim saltBytesLen As Long saltBytesLen = UBound(saltBytes) - LBound(saltBytes) + 1 Dim plainTextWithSaltBytes() As Byte ReDim plainTextWithSaltBytes(plainTextBytesLen + saltBytesLen) For i = 0 To plainTextBytesLen - 1 plainTextWithSaltBytes(i) = plainTextBytes(i) Next For i = 0 To saltBytesLen - 1 plainTextWithSaltBytes(i) = saltBytes(i) Next 'Dim hash As HashAlgorithm = New MD5CryptoServiceProvider() Dim hash12 As New SHA256Managed 'SHA256Managed Dim totLen As Integer totLen = plainTextBytesLen + saltBytesLen Dim str As String Dim hashBytes() As Byte 'With hashBytes = hash12.computeHash(plainTextWithSaltBytes) ', 0, totLen) 'End With End Sub

    Read the article

  • Need help with fonts in latex: output too dim

    - by laspal
    I have a problem where all fonts come out too dim. Is there any thing I can do to get a different look and feel from the pdfs? My tex file looks like \documentclass[a4paper,twoside]{article}` \usepackage{graphics} \usepackage{color} \usepackage{hyperref} \usepackage{multirow} \usepackage{longtable} \usepackage{fullpage} \usepackage[pdftex]{graphicx} \usepackage{fancyhdr} \oddsidemargin 0cm \evensidemargin 0cm \pagestyle{fancy} \renewcommand{\headrulewidth}{0.0pt} \rfoot{Raval, Ketan R -13223} \textwidth 15.5cm \topmargin -1cm \parindent 0cm \textheight 26.5cm \parskip 1mm \begin{document} \fontencoding{\encodingdefault} \renewcommand{\familydefault}{\sfdefault} \fontshape{\shapedefault} \selectfont So how can I improve my overall look and feel of the pdf? Thanks

    Read the article

  • C# huge size 2-dim arrays

    - by 4eburek
    I need to declare square matrices in C# WinForms with more than 20000 items in a row. I read about 2GB .Net object size limit in 32bit and also the same case in 64bit OS. So as I understood the single answer - is using unsafe code or separate library built withing C++ compiler. The problem for me is worth because ushort[20000,20000] is smaller then 2GB but actually I cannot allocate even 700MB of memory. My limit is 650MB and I don't understand why - I have 32bit WinXP with 3GB of memory. I tried to use Marshal.AllocHGlobal(700<<20) but it throws OutOfMemoryException, GC.GetTotalMemory returns 4.5MB before trying to allocate memory. I found only that many people say use unsafe code but I cannot find example of how to declare 2-dim array in heap (any stack can't keep so huge amount of data) and how to work with it using pointers. Is it pure C++ code inside of unsafe{} brackets? Could you please provide a small example of working with matrices using pointers in unsafe code.

    Read the article

  • How do I resolve this scope issue in VB .NET?

    - by froadie
    I have a code structure something like this: For row = 1 To numRows Dim arrayIndex As Integer = 0 For column As Integer = bucketStartColumn To bucketEndColumn ' whatever code arrayIndex = arrayIndex + 1 Next Next Dim arrayIndex As Integer = 0 For column As Integer = bucketStartColumn To bucketEndColumn ' whatever code arrayIndex = arrayIndex + 1 Next Not exactly the code, so I don't really need suggestions about refactoring, but my problem is this - with this code I get a compiler error for the first Dim arrayIndex As Integer = 0 - "Variable 'arrayIndex' hides a variable in an enclosing block." As far as I can tell, arrayIndex is local to the first for loop and shouldn't exist by the time we reach the second loop. If I try to change the second declaration of arrayIndex to arrayIndex = 0, I get the error "Name 'arrayIndex' is not declared", as I expected. So is it visible, or not? Does this have something to do with the Dim keyword? Any suggestions of how to get around this, other than naming the second index variable something else?

    Read the article

  • initialising a 2-dim Array in Scala

    - by Stefan W.
    (Scala 2.7.7:) I don't get used to 2d-Arrays. Arrays are mutable, but how do I specify a 2d-Array which is - let's say of size 3x4. The dimension (2D) is fixed, but the size per dimension shall be initializable. I tried this: class Field (val rows: Int, val cols: Int, sc: java.util.Scanner) { var field = new Array [Char](rows)(cols) for (r <- (1 to rows)) { val line = sc.nextLine () val spl = line.split (" ") field (r) = spl.map (_.charAt (0)) } def put (val rows: Int, val cols: Int, c: Char) = todo () } I get this error: :11: error: value update is not a member of Char field (r) = spl.map (_.charAt (0)) If it would be Java, it would be much more code, but I would know how to do it, so I show what I mean: public class Field { private char[][] field; public Field (int rows, int cols, java.util.Scanner sc) { field = new char [rows][cols]; for (int r = 0; r < rows; ++r) { String line = sc.nextLine (); String[] spl = line.split (" "); for (int c = 0; c < cols; ++c) field [r][c] = spl[c].charAt (0); } } public static void main (String args[]) { new Field (3, 4, new java.util.Scanner ("fraese.fld")); } } and fraese.fld would look, for example, like that: M M M M . M I get some steps wide with val field = new Array Array [Char] but how would I then implement 'put'? Or is there a better way to implement the 2D-Array. Yes, I could use a one-dim-Array, and work with put (y, x, c) = field (y * width + x) = c but I would prefer a notation which looks more 2d-ish.

    Read the article

  • AddHandler not working?

    - by EdenMachine
    I can't figure out why my addhandler is not firing? In the Sub "CreateTagStyle" thd AddHandler is to firing when the LinkButton is clicked Is there some reason that addhandlers can't be adding at certain points of the page lifecycle? <%@ Page Title="" Language="VB" MasterPageFile="~/_Common/Admin.master" %> <script runat="server"> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) End Sub Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) If Not e.IsFromDetailTable Then Dim forms As New MB.RequestFormPacket() RadGrid1.DataSource = forms.GetPackets() End If End Sub Protected Sub RadGrid1_DetailTableDataBind(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Select Case e.DetailTableView.Name Case "gtvForms" Dim PacketID As Guid = e.DetailTableView.ParentItem.GetDataKeyValue("ID") e.DetailTableView.DataSource = MB.RequestForm.GetRequestForms(PacketID) End Select End Sub Protected Sub RadGrid1_InsertCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) If IsValid Then Select Case TryCast(e.Item.NamingContainer.NamingContainer, GridTableView).Name Case "gtvPackets" Dim rtbName As RadTextBox = TryCast(e.Item.FindControl("rtbName"), RadTextBox) Dim IsActive As Boolean = TryCast(e.Item.FindControl("cbxIsActive"), CheckBox).Checked Dim packet As New MB.RequestFormPacket() packet.Name = rtbName.Text packet.IsActive = IsActive packet.Insert() e.Canceled = True e.Item.OwnerTableView.IsItemInserted = False RadGrid1.Rebind() System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "SuccessMessage('Request Form Packet has been added successfully.');", True) Case "gtvForms" Dim parentItem As GridDataItem = e.Item.OwnerTableView.ParentItem Dim rcbForms As RadComboBox = TryCast(e.Item.FindControl("rcbForms"), RadComboBox) Dim rf As New MB.RequestForm() rf.RequestFormPacketID = CType(parentItem.OwnerTableView.DataKeyValues(parentItem.ItemIndex)("ID"), Guid) rf.FormID = rcbForms.SelectedValue If MB.RequestFormPacket.HasItems(rf.RequestFormPacketID) Then rf.SortOrder = rf.MaxSortOrder + 1 Else rf.SortOrder = 0 End If rf.Insert() e.Canceled = True e.Item.OwnerTableView.IsItemInserted = False TryCast(e.Item.NamingContainer.NamingContainer, GridTableView).Rebind() End Select End If End Sub Protected Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) If IsValid Then Select Case TryCast(e.Item.NamingContainer, GridTableView).Name Case "gtvPackets" Dim PacketID As Guid = CType(CType(e.CommandSource, Button).NamingContainer, GridEditFormItem).GetDataKeyValue("ID") Dim Name As String = TryCast(e.Item.FindControl("rtbName"), RadTextBox).Text Dim Tags As String = TryCast(e.Item.FindControl("hdnTags"), HiddenField).Value Dim IsActive As Boolean = TryCast(e.Item.FindControl("cbxIsActive"), CheckBox).Checked Dim rfp As New MB.RequestFormPacket() rfp.Update(PacketID, Name, IsActive) Call MB.RequestFormPacketTag.Insert(PacketID, Tags) e.Item.Edit = False TryCast(e.Item.NamingContainer, GridTableView).Rebind() System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "SuccessMessage('Request Form Packet has been updated successfully.');", True) Case "gtvForms" Dim RequestFormID As Guid = CType(CType(e.CommandSource, Button).NamingContainer, GridEditFormItem).GetDataKeyValue("ID") Dim rcbForms As RadComboBox = TryCast(e.Item.FindControl("rcbForms"), RadComboBox) Dim rf As New MB.RequestForm() rf.Update(RequestFormID, rcbForms.SelectedValue) e.Item.Edit = False TryCast(e.Item.NamingContainer, GridTableView).Rebind() End Select End If End Sub Protected Sub RadGrid1_DeleteCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem) Select Case CType(editedItem.Parent.Parent, GridTableView).Name Case "gtvPackets" Dim ID As Guid = CType(CType(e.CommandSource, ImageButton).NamingContainer, GridDataItem).GetDataKeyValue("ID") MB.RequestFormPacket.Delete(ID) System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "NotifyMessage('Request Form Packet has been deleted.');", True) Case "gtvForms" Dim ID As Guid = CType(CType(e.CommandSource, ImageButton).NamingContainer, GridDataItem).GetDataKeyValue("ID") MB.RequestForm.Delete(ID) System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "NotifyMessage('Request Form has been removed.');", True) End Select End Sub Protected Sub ibnItemUpArrow_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Dim gtv As GridTableView = CType(CType(sender, ImageButton).NamingContainer.NamingContainer, GridTableView) Dim ID As Guid = New Guid(e.CommandArgument.ToString()) Call MB.RequestForm.MoveUp(ID) gtv.Rebind() End Sub Protected Sub ibnItemDownArrow_Command(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Dim gtv As GridTableView = CType(CType(sender, ImageButton).NamingContainer.NamingContainer, GridTableView) Dim ID As Guid = New Guid(e.CommandArgument.ToString()) Call MB.RequestForm.MoveDown(ID) gtv.Rebind() End Sub Protected Sub RadGrid1_RowDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDragDropEventArgs) If String.IsNullOrEmpty(e.HtmlElement) Then If e.DraggedItems(0).OwnerGridID = RadGrid1.ClientID Then If e.DestDataItem IsNot Nothing Then Dim gtv As GridTableView = CType(e.DestDataItem.NamingContainer, GridTableView) For Each gdi As GridDataItem In e.DraggedItems Select Case gtv.Name Case "gtvForms" MB.RequestForm.DragAndDropReorder(gdi.GetDataKeyValue("ID"), e.DestDataItem.GetDataKeyValue("ID"), IIf(e.DropPosition = GridItemDropPosition.Above, True, False)) gtv.Rebind() End Select Next End If End If End If End Sub Protected Sub cbxAllowDragAndDrop_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Dim cbx As CheckBox = CType(sender, CheckBox) If cbx.Checked Then RadGrid1.ClientSettings.AllowRowsDragDrop = True RadGrid1.ClientSettings.Selecting.AllowRowSelect = True RadGrid1.ClientSettings.Selecting.EnableDragToSelectRows = True Else RadGrid1.ClientSettings.AllowRowsDragDrop = False RadGrid1.ClientSettings.Selecting.AllowRowSelect = False RadGrid1.ClientSettings.Selecting.EnableDragToSelectRows = False End If End Sub Protected Sub ibnDisableToggleProcess_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Dim ibn As ImageButton = CType(sender, ImageButton) Dim hdn As HiddenField = CType(ibn.NamingContainer.FindControl("hdnDisableProcessID"), HiddenField) Dim status As Boolean = MB.RequestFormPacket.ActivateToggle(New Guid(hdn.Value)) Dim gtv As GridTableView = CType(ibn.NamingContainer.NamingContainer, GridTableView) gtv.Rebind() System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "SuccessMessage('Process has been " & IIf(status, "Activated", "Deactivated") & ".');", True) End Sub Protected Function DisplayTagList(ByVal tags As IEnumerable(Of MB.RequestFormPacketTag)) As String Dim list As String = "" For Each t As MB.RequestFormPacketTag In tags list += "<span class=""tags"">" & t.Tag.Name & "</span>" Next Return list End Function Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Select Case e.Item.GetType.Name Case "GridEditFormInsertItem" 'do nothing Case "GridEditFormItem" Dim plh As PlaceHolder = CType(e.Item.FindControl("plhTags"), PlaceHolder) Dim hdn As HiddenField = CType(e.Item.FindControl("hdnTags"), HiddenField) If hdn IsNot Nothing Then Dim gefi As GridEditFormItem = e.Item Dim packet As MB.RequestFormPacket = gefi.DataItem For Each pt As MB.RequestFormPacketTag In packet.RequestFormPacketTags Call CreateTagStyle(plh, hdn, pt.Tag.Name) If hdn.Value = "" Then hdn.Value = "|" End If hdn.Value += pt.Tag.Name & "|" Next End If End Select End Sub Protected Sub btnAddTag_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim btnAddTag As Button = sender Dim rtbTags As RadTextBox = btnAddTag.NamingContainer.FindControl("rtbTags") Dim plhTags As PlaceHolder = btnAddTag.NamingContainer.FindControl("plhTags") Dim hdnTags As HiddenField = btnAddTag.NamingContainer.FindControl("hdnTags") Dim TagExists As Boolean = False rtbTags.Text = rtbTags.Text.ToUpper().Trim() Dim currentTags() As String = Split(hdnTags.Value, "|") For i As Integer = 1 To currentTags.Count - 2 Call CreateTagStyle(plhTags, hdnTags, currentTags(i)) Next If TagExists = False And String.IsNullOrEmpty(rtbTags.Text) = False Then Call CreateTagStyle(plhTags, hdnTags, rtbTags.Text) If String.IsNullOrEmpty(hdnTags.Value) Then hdnTags.Value = "|" End If hdnTags.Value += rtbTags.Text & "|" 'System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "ClientMessage", "highlightTag('" & lbn.ClientID & "');", True) End If rtbTags.Text = "" rtbTags.Focus() End Sub Public Sub RemoveTag(ByVal sender As Object, ByVal e As EventArgs) Response.End() Dim lbnSender As LinkButton = sender Dim plhTags As PlaceHolder = lbnSender.NamingContainer.FindControl("plhTags") Dim hdnTags As HiddenField = lbnSender.NamingContainer.FindControl("hdnTags") Response.Write(hdnTags.Value) Response.End() Dim TagExists As Boolean = False Dim currentTags() As String = Split(hdnTags.Value, "|") For i As Integer = 1 To currentTags.Count - 2 Call CreateTagStyle(plhTags, hdnTags, currentTags(i)) Next End Sub Protected Sub CreateTagStyle(ByVal plh As PlaceHolder, ByVal hdn As HiddenField, ByVal tagName As String) Dim lbn As New LinkButton() lbn.ID = "lbn_" & hdn.ClientID & "_" & tagName lbn.CssClass = "deleteCreateTag" lbn.Text = "X" AddHandler lbn.Click, AddressOf RemoveTag plh.Controls.Add(New LiteralControl("<div><span class=showTag>" & tagName & "</span>")) plh.Controls.Add(lbn) plh.Controls.Add(New LiteralControl("</div>")) End Sub </script> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <style type="text/css"> .tags { border:solid 1px #93AFE5; background-color:#F3F7F8; margin: 0px 2px 0px 2px; padding: 0px 4px 0px 4px; font-family:Verdana; font-size:10px; text-transform:uppercase; } </style> <script type="text/javascript"> function highlightTag(id) { $("#" + id).highlightFade({ color: '#FFFF99', speed: 2000, iterator: 'sinusoidal' }); } </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnableAJAX="false"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="WebBlue" style="position:relative;top:1px;" ValidationGroup="vgTabs"> <Tabs> <telerik:RadTab Text="Request Form Packets" Selected="true" ImageUrl="~/Admin/Images/Packet2.png" /> <telerik:RadTab Text="Request Forms" NavigateUrl="Forms.aspx" ImageUrl="~/Admin/Images/Forms.png" /> </Tabs> </telerik:RadTabStrip> <asp:ObjectDataSource ID="odsForms" runat="server" TypeName="MB.Form" SelectMethod="GetForms" /> <asp:Panel ID="pnlContent" runat="server" CssClass="ContentPanel"> <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="True" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" OnInsertCommand="RadGrid1_InsertCommand" OnUpdateCommand="RadGrid1_UpdateCommand" OnDeleteCommand="RadGrid1_DeleteCommand" OnRowDrop="RadGrid1_RowDrop" OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnItemDataBound="RadGrid1_ItemDataBound"> <%-----------------------------------------------------------%> <%------------------------- PACKETS -------------------------%> <%-----------------------------------------------------------%> <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID" ClientDataKeyNames="ID" ShowHeadersWhenNoRecords="true" Name="gtvPackets" NoMasterRecordsText="There are currently no Request Form Packets" GroupLoadMode="Client" RetrieveNullAsDBNull="true" CommandItemDisplay="Top" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true" AllowAutomaticInserts="true"> <RowIndicatorColumn> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <CommandItemTemplate> <table width="100%"> <tr> <td class="AdminGridHeader">&nbsp;<img src="../Admin/Images/Packet2.png" align="absmiddle" width="16" height="16" />&nbsp;&nbsp;Request Form Packets</td> <td width="1%"><asp:CheckBox ID="cbxAllowDragAndDrop" runat="server" AutoPostBack="true" OnCheckedChanged="cbxAllowDragAndDrop_CheckedChanged" /></td> <td width="1%" nowrap="nowrap"><asp:Label AssociatedControlID="cbxAllowDragAndDrop" ID="Label1" runat="server" Text="Enable Drag and Drop Reordering" ToolTip="Drag and Drop Reordering applies only to Forms." /></td> <td align="right" width="1%"><asp:Button ID="btnAddPacket" Text="Create New Packet" runat="server" CommandName="InitInsert" /></td> </tr> </table> </CommandItemTemplate> <EditFormSettings> <EditColumn ButtonType="PushButton" HeaderStyle-Font-Bold="true" UniqueName="EditCommandColumn" /> </EditFormSettings> <EditItemStyle Font-Bold="true" BackColor="#FFFFCC" /> <Columns> <telerik:GridTemplateColumn HeaderText="Packet Name" UniqueName="PacketName" SortExpression="Name"> <ItemTemplate> <img src="../Admin/Images/Packet2.png" align="absmiddle" width="16" height="16" />&nbsp;&nbsp;<%#Eval("Name")%> </ItemTemplate> <EditItemTemplate> <telerik:RadTextBox runat="server" ID="rtbName" Width="300" Text='<%# Bind("Name") %>' /> <asp:RequiredFieldValidator ID="rfvName" runat="server" ErrorMessage="Required" ControlToValidate="rtbName" /> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Tags" UniqueName="Tags"> <ItemTemplate> <%#DisplayTagList(Eval("RequestFormPacketTags"))%> </ItemTemplate> <EditItemTemplate> <asp:Panel ID="pnlAddTags" runat="server" DefaultButton="btnAddTag"> <table cellpadding="0" cellspacing="0"> <tr> <td> <telerik:RadTextBox ID="rtbTags" runat="server" Width="200" style="text-transform:uppercase;" /> <asp:RegularExpressionValidator ID="revTags" runat="server" ErrorMessage="Invalid Entry" ControlToValidate="rtbTags" Display="Dynamic" ValidationExpression="^[^<>`~!/@\#}$%:;)(_^{&*=|+]+$" ValidationGroup="vgTags" /> </td> <td> <asp:Button ID="btnAddTag" runat="server" ValidationGroup="vgTags" Text="Add" OnClick="btnAddTag_Click" /> </td> </tr> </table> </asp:Panel> <div id="divTags"> <asp:PlaceHolder id="plhTags" runat="server" /> <asp:HiddenField ID="hdnTags" runat="server" /> </div> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderTooltip="Disable" ItemStyle-Width="1%" ItemStyle-HorizontalAlign="Center" SortExpression="IsActive" UniqueName="IsActive" ReadOnly="true"> <ItemTemplate> <asp:ImageButton ID="ibnDisabledProcess" runat="server" ImageUrl="../Images/Icons/Stop.png" Width="16" OnClientClick="return window.confirm('Activate this Process?');" ToolTip="Click to activate this Request for Account use." Visible='<%#IIF(Eval("IsActive"),false,true) %>' OnClick="ibnDisableToggleProcess_Click" /> <asp:ImageButton ID="ibnEnabledProcess" runat="server" ImageUrl="../Images/Icons/Stop_disabled.png" Width="16" OnClientClick="return window.confirm('Deactivate this Process?');" ToolTip="Click to deactivate this Request for Account use." Visible='<%#IIF(Eval("IsActive"),true,false) %>' OnClick="ibnDisableToggleProcess_Click" /> <asp:HiddenField ID="hdnDisableProcessID" runat="server" Value='<%#Eval("ID") %>' /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Is Active" UniqueName="IsActiveCheckbox" Display="false"> <EditItemTemplate> <asp:CheckBox ID="cbxIsActive" runat="server" Checked='<%# IIF(Eval("IsActive") Is DbNull.Value OrElse Eval("IsActive") = False,False,True) %>' /> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridEditCommandColumn ButtonType="ImageButton" EditText="Edit Admin" ItemStyle-Width="16" EditImageUrl="~/Images/edit-small.png" /> <telerik:GridButtonColumn ConfirmText="Do you really want to delete this Admin? WARNING: THIS CANNOT BE UNDONE!!" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete Admin" ImageUrl="~/Images/Delete.png" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" Width="16" /> </telerik:GridButtonColumn> </Columns> <DetailTables> <%-----------------------------------------------------------%> <%-------------------------- FORMS --------------------------%> <%-----------------------------------------------------------%> <telerik:GridTableView Name="gtvForms" AllowPaging="true" PagerStyle-Position="TopAndBottom" PageSize="20" AutoGenerateColumns="false" DataKeyNames="RequestFormPacketID,ID" runat="server" CommandItemDisplay="Top" Width="100%"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="RequestFormPacketID" MasterKeyField="ID" /> </ParentTableRelation> <CommandItemTemplate> <table width="100%" class="AdminGridHeaders"> <tr> <td class="AdminGridHeaders"> &nbsp;<img src="../Admin/Images/Forms.png" align="absmiddle" width="16" height="16" />&nbsp;&nbsp;Forms </td> <td align="right"> <asp:Button ID="ibnAdd" runat="server" Text="Add Form" CommandName="InitInsert" /> </td> </tr> </table> </CommandItemTemplate> <EditFormSettings> <EditColumn ButtonType="PushButton" InsertText="Save" UpdateText="Update" CancelText="Cancel" /> </EditFormSettings> <EditItemStyle Font-Bold="true" BackColor="#FFFFCC" /> <Columns> <telerik:GridTemplateColumn HeaderText="Form Name" UniqueName="FormName"> <ItemTemplate> <img src="../Admin/Images/Forms.png" align="absmiddle" width="16" height="16" style="margin-right:4px;" /> <%#Eval("Form.Name")%> </ItemTemplate> <EditItemTemplate> <telerik:RadComboBox ID="rcbForms" runat="server" DataSourceID="odsForms" AppendDataBoundItems="true" DataTextField="Name" DataValueField="ID" SelectedValue='<%#Bind("FormID")%>'> <Items> <telerik:RadComboBoxItem Text="-- Select a Form --" Value="" /> </Items> </telerik:RadComboBox> <asp:RequiredFieldValidator ID="rfvForms" runat="server" ErrorMessage="Required" ControlToValidate="rcbForms" InitialValue="-- Select a Form --" Display="Dynamic" /> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Test" ReadOnly="true" UniqueName="TestForm" HeaderStyle-Width="1%" ItemStyle-HorizontalAlign="Center"> <ItemTemplate> <asp:HyperLink ID="hypTestForm" runat="server" NavigateUrl='<%# "FormsPreview.aspx?fid=" & Eval("FormID").ToString() & "&test=true" %>' Target="_blank"><asp:Image ID="imgTestProcess" runat="server" ImageUrl="~/Admin/Images/Test.png" ImageAlign="AbsMiddle" ToolTip="Test Form" /></asp:HyperLink> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="Header" SortExpression="Header" UniqueName="Header"> <ItemTemplate> <%#Eval("Form.Header")%>&nbsp; </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn ReadOnly="true" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="1%" HeaderStyle-Wrap="false" ItemStyle-Wrap="false" UniqueName="SortOrder"> <ItemTemplate> <asp:ImageButton ID="ibnItemUpArrow" runat="server" Width="16" height="16" ImageUrl="~/Admin/Images/ArrowUp.png" ImageAlign="AbsMiddle" Visible='<%#IIF(Eval("SortOrder") = 0,false,true) %>' CommandArgument='<%#Eval("ID") %>' OnCommand=

    Read the article

  • jQuery Dialog + Chrome - opening a second modal dialog doesn't dim the page

    - by psychotik
    I have a jQuery modal dialog with a button. When clicked, it closes the current dialog and open another modal dialog. This works fine in FF and IE, but in Chrome I lose the dimmed main page after the first dialog and the second one is opened. It looks like the CSS isn't applied anymore? I'm using jQuery UI 1.7.2 and jQuery 1.3.2 (can't upgrade to 1.4.1 for an unrelated reason). Any ideas/workarounds?

    Read the article

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