Search Results

Search found 987 results on 40 pages for 'abdullah al khalidi'.

Page 9/40 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Python: Problem Importing Function From Another Module

    - by Rafid K. Abdullah
    I have a module called nbemail.py and in this module I want to use the function package_post defined in the module main.py. I am using this statement: from api.main import package_post But I am getting this error: ImportError: cannot import name package_post I really don't know why I am getting this error! I do have _init_.py files in the api directory (which contains the files nbemail.py and main.py) and I do have the function package_post defined in main.py. Any idea to help fixing this problem?

    Read the article

  • Displaying NON-ASCII Characters using HttpClient

    - by Abdullah Gheith
    So, i am using this code to get the whole HTML of a website. But i dont seem to get non-ascii characters with me. all i get is diamonds with question mark. characters like this: å, appears like this: ? I doubt its because of the charset, what could it then be? Log.e("HTML", "henter htmlen.."); String url = "http://beep.tv2.dk"; HttpClient client = new DefaultHttpClient(); client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1); client.getParams().setParameter(CoreProtocolPNames.HTTP_ELEMENT_CHARSET, "UTF-8"); HttpGet request = new HttpGet(url); HttpResponse response = client.execute(request); Header h = HeaderValueFormatter response.addHeader(header) String html = ""; InputStream in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); StringBuilder str = new StringBuilder(); String line = null; while((line = reader.readLine()) != null) { str.append(line); } in.close(); //b = false; html = str.toString();

    Read the article

  • OGRE: Non-Standard Resolution

    - by Rafid K. Abdullah
    I am using OGRE to make a re-rendering of the film, which has a wide aspect ratio (around 1.85). The OGRE dialog seems to be showing the standard full screen resolution by default (800/600, 1024/768, etc.), but those obviously have aspect ratios of 1.333 or around that. But as long as I am not running full screen mode, why should I be restricted to these screen sizes only? I can definitely change the viewport size, but that would make it difficult for me to generate the video later. Any idea?

    Read the article

  • Vim: Making Auto-Completion Smarter

    - by Rafid K. Abdullah
    I use ctags, taglist, etc., to have auto completion in Vim. However, it is very limited compared to Visual Studio intellisense or Eclipse auto-completion. I am wondering whether it is possible to tune Vim to: Show auto-completion whenever . or - are typed. But only after some text that might be a variable (e.g. avoid showing auto completion after a number). Show function parameters when ( is typed. Stop removing the auto completion list when some delete all characters after . or -: When I enter a variable name, then press . or - to search for a certain member, I frequently have to delete all the characters I type after the . or -, but this makes Vim hide the auto completion list. I would like to keep it visible unless I press Esc. Showing related auto completion: When I type a variable and press ^X ^O, it usually shows me all the tags in the ctags file. I would like to have it showing only the tags related to the variable. Thanks for the help. EDIT: Some people are voting for this question, but no body seems to know the answer. So just wanted to mention that you don't have to provide a complete answer; partial answers to any of the mentioned points would be good also.

    Read the article

  • Unit testing a controller in ASP.NET MVC 3

    - by Abdullah Al- Mansur
    public Double Invert(Double? id) { return (Double)(id / id); } I have done this for this test but fails please can anyone help with this cos just started with unit testing /* HINT: Remember that you are passing Invert an *integer* so * the value of 1 / input is calculated using integer arithmetic. * */ //Arrange var controller = new UrlParameterController(); int input = 7; Double expected = 0.143d; Double marginOfError = 0.001d; //Act var result = controller.Invert(input); //Assert Assert.AreEqual(expected, result, marginOfError); /* NOTE This time we use a different Assert.AreEqual() method, which * checks whether or not two Double values are within a specified * distance of one another. This is a good way to deal with rounding * errors from floating point arithmetic. Without the marginOfError * parameter the assertion fails. * */

    Read the article

  • Forced closed only when put alphabetical string in edit text

    - by Abdullah Al Mubarok
    So, I make a checker if an id is in the database or not, the id is in numerical string, the type in database is char(6) though. So this is my code public class input extends Activity{ /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.input); final EditText edittext = (EditText)findViewById(R.id.editText1); Button button = (Button)findViewById(R.id.button1); button.setOnClickListener(new OnClickListener(){ @Override public void onClick(View arg0) { // TODO Auto-generated method stub String nopel = edittext.getText().toString(); if(nopel.length() == 0){ Toast.makeText(getApplicationContext(), "error", Toast.LENGTH_SHORT).show(); }else{ List<NameValuePair> pairs = new ArrayList<NameValuePair>(); pairs.add(new BasicNameValuePair("nopel", nopel)); JSON json_dp = new JSON(); JSONObject jobj_dp = json_dp.getJSON("http://10.0.2.2/KP/pdam/nopel.php", pairs); try { if(jobj_dp.getInt("row") == 0){ Toast.makeText(getApplicationContext(), "error", Toast.LENGTH_SHORT).show(); }else{ String snopel = jobj_dp.getString("nopel"); String snama = jobj_dp.getString("nama"); String salamat = jobj_dp.getString("alamat"); String sgolongan = jobj_dp.getString("golongan"); Intent i = new Intent(input.this, list.class); i.putExtra("nopel", snopel); i.putExtra("nama", snama); i.putExtra("alamat", salamat); i.putExtra("golongan", sgolongan); startActivity(i); } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }); } } the first check is to check if an input is null, it's going right for now, the second check is to check if an id in the database, and it's the problem. When I try some id in numerical value like "0001" or "02013" it's fine, and can run. but when I just got to put "abushd" it forced close. anyone know why I got this?

    Read the article

  • How to improve performance of opening Microsoft Word when automated from c#?

    - by Abdullah BaMusa
    I have Microsoft Word template that I automated filling it’s fields from my application, and when the user request print I open this template. but creating word application every time user request print after filling fields is very expensive and lead to some delay while opening the template, so I choose to cache the reference to Word then just open the new filled template. that solve the performance issue as opening file is less expensive than recreating Word each time, but this work while the user just close the document not the entire Word application which when happened my reference to Word become invalid and return with exception says: “The RPC server is unavailable” next time request opening template . I tried to subscribe to BeforClosing event but his trigger for Quitting Word as well as Closing documents. My question is how to know if the word is closing document or quit the entire application so I take the proper action, or any hint for another direction of thinking about improve performance of opening word template.

    Read the article

  • JSON can't read, key reading fail maybe

    - by Abdullah Al Mubarok
    I wonder why I can't read the JSON Object like this : { "1":{"bulan":"Januari","tahun":"2012","tagihan":"205000","status":"Lunas"}, "2":{"bulan":"Februari","tahun":"2012","tagihan":"180000","status":"Lunas"}, "3":{"bulan":"Maret","tahun":"2012","tagihan":"120000","status":"Lunas"}, "4":{"bulan":"April","tahun":"2012","tagihan":"230000","status":"Lunas"}, "5":{"bulan":"Mei","tahun":"2012","tagihan":"160000","status":"Lunas"}, "6":{"bulan":"Juni","tahun":"2012","tagihan":"150000","status":"Belum Lunas"}, "panjang":6 } with my android code like this : try { int length = jobj.getInt("panjang"); for(int n = 0; n < length; n++){ String m = Integer.toString(n) JSONObject row = jobj.getJSONObject(m); String bulan = row.getString("bulan"); String tahun = row.getString("tahun"); String tagihan = row.getString("tagihan"); String status = row.getString("status"); HashMap<String, String> map = new HashMap<String, String>(); map.put("bulan", bulan); map.put("tahun", tahun); map.put("tagihan", tagihan); map.put("status", status); list.add(map); } } catch (JSONException e) { e.printStackTrace(); } It always return nothing, but it works fine if I change the key m to specific key like if String m = "1"; and I can't use JSONObject row = jobj.getJSONObject(n); because getJSONObject() just accept string, not int. is there something wrong with my code?

    Read the article

  • Javascript Regex Replace string, special character need help

    - by Mohummad Abdullah
    I am trying to replace string on page in runtime example: find string "(800).123.4567" to "<span>(800)123.4567</span>" means i want to add span tag before and after of string. here is i m doing this is my code: var avidno = '(800)123 1234'; function validate () { var regex = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/; if (regex.test(avidno)) { alert('bingo'); var altrstr = '<span>'+avidno+'</span>'; alert(altrstr); // Valid international phone number } else { alert('uupss'); // Invalid international phone number } } validate();

    Read the article

  • Como Exportar Crystal Reports a Excel, Word, Rich Text, PDF ó HTML

    - by jaullo
    Cuando trabajamos con reportes siempre requerimos la funcionalidad de exportación. En crystal reports para asp.net, realizar esta tarea es sumamente sencillo. Sin embargo la pregunta más grande que salta siempre, es como realizarlo utilizando código Behind. Para poder acceder a las librerias de crystal y sus componentes, primero debemos importar los espacios de nombres: Normal 0 21 false false false ES X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Imports CrystalDecisions.CrystalReports.Engine Imports CrystalDecisions.Shared  CrystalDecisions.CrystalReports.Engine, nos servirá para poder manejar nuestro reportDocument y CrystalDecisions.Shared, será el medio que utilicemos para la exportación. Así que, veamos como podemos exportar nuestro informe sin tener que enviarlo a la impresora, recordemos que por defecto crystal reports ya tiene la opcion de exportar a PDF sin embargo debemos hacerlo tal como si fueramos a imprimir y que es lo que evitaremos acá. Colocamos un botón en nuestra pagina asp Normal 0 21 false false false ES X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} <asp:Button ID="btntopdf" runat="server" Text="Exportar a PDF" /> Y en nuestro boton deberemos ejecutar la siguiente rutina: Normal 0 21 false false false ES X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Protected Sub btntodpf_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btntopdf.Click          'Cargar reporte. Enlazando a la fuente de datos.        LoadReporte()          'Mas adelante veremos que estas lineas las podemos obviar        Response.Buffer = False        Response.Clear()  'ClearContent, ClearHeaders          reporteDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "NombreArchivo")       End Sub LoadReport, es el encargado de llenar nuestro crystal con la fuente de datos. Está fue la primer forma de exporta nuestro crystal reports, pero no es la única, así que vamos a ver otra forma en la cual utilizaremos el metodo v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false 21 false false false ES X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} ExportToHttpResponse  Para este metodo, nuestro código en el botón cambia relativamente, pero antes de ello, daremos un repaso a los metodos utilizados. Nuestro primer parametro FormatType es un valor de tipo ExportFormatType, que puede corresponder a cualquiera de los metodos que enumeramos a continuación: CrystalReport: El formato al cual se exporta es de Tipo CrystalReport. Excel: El formato al cual se exporta es de tipo Excel ExcelRecord: El formato al cual se exporta es de Tipo Excel Record. NoFormat: No se ha especificado un formato de exportación. PortableDocFormat: El formato al cual se exporta es de Tipo PDF.  No voy a enumerar todos, pues me imagino que ya sabrán la idea de cada uno de los formatos, los numerados arriba son los mas importantes. Nuestro segundo parametro el objeto response nos permite adozar el archivo. Y por último, nuestro tercer parametro, definirá si debe ir como un objeto adjunto o no. Si lo colocamos en TRUE, estaremos enviando nuestro archivo como parametro, esto hará que no necesitemos las siguientes líneas de código: Normal 0 21 false false false ES X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Response.Buffer = False Response.Clear()   Con esto realizado, ya contamos con la posibilidad de enviar el archivo directamente al cliente.   Ahora si, veamos cuanto se ha reducido nuestro código: Unicamente nos quedan dos líneas de código en nuestro botón Normal 0 21 false false false ES X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Tabla normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}        'Cargar reporte. Enlazando a la fuente de datos.        LoadReport()          reporteDoc.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, True, "NombreArchivo")   Para finalizar, nada mas decir que espero esto les sea de ayuda y por supuesto,  que les facilite la vida con el uso de crystal reports.

    Read the article

  • IIS 7 (Windows Server 2008) no entrega javascript ni css

    - by José Marcos García Espinosa
    Hace algunos días, jugando con las configuraciones del IIS, revolvíamos las opciones de compresión de contenidos. La intención era habilitar gzip para el contenido estático pero la cosa salió tan mal que el portal, en vez de reducir su tamaño por los contenidos comprimidos, lo "redujo" porque el servidor dejó de enviar los archivos javascript y las hojas de estilo al navegador. Después de estar buscando como hora y media, resultó que la explicación y la solución eran bastante sencillas (y ni siquiera las encontramos nosotros): Al estar cambiando las opciones de compresión de contenidos estáticos del IIS, se crearon unos archivos de configuración (web.config's) tanto en la carpeta de los archivos javascript como en la de las hojas de estilo, que es una estructura que el propio IIS no reconocía y dejaba la aplicación 'cortada', dejando fuera estas carpetas. Eliminar ambos archivos de configuración bastó para volver a visualizar el portal como se debía.. de la compresión, creo que ya ni seguimos buscando.

    Read the article

  • Silverlight Cream for March 29, 2010 -- #824

    - by Dave Campbell
    In this Issue: smartyP(-2-), Al Pascual, Mike Taulty, Shawn Burke(-2-), Vikram Pendse, Tomasz Janczuk, Lee, and Alexey Zakharov. Shoutouts: Jeff Weber announced New Silverlight Game “Snow Spill” by Nick Avery of Liserd Arts Games John Papa summarized links to all the Silverlight and Windows Phone 7 Sessions from MIX 10 Tim Heuer has a post up about OData and the MIX10 feed: MIX10: Yet another way to view video content sessions using their OData feed From SilverlightCream.com: Creating a Windows Phone 7 Metro Style Pivot Application [Part 1] smartyP has a two-part video tutorial up on creating a WP7 pivot navigation app using Expression Blend. He's also looking for feedback. Creating a Windows Phone 7 Metro Style Pivot Application [Part 2] In part 2, smartyP adds gestures to his navigation. He also has some good external links listed. Al Pascual: My First Windows Phone 7 Application Al Pascual extends the MIX10 keynote WP7 sample by adding the ability to send tweets ... with all the code. Silverlight 4 RC and the “silent installation” Mike Taulty discusses and demonstrates installing an OOB app without having to visit a webpage to get it. In other words, pass it around on a USB drive, send it in email, etc. iPhone SDK vs Windows Phone 7 Series SDK Challenge, Part 1: Hello World! Shawn Burke has a 2-part series up comparing iPhone and WP7 development looking at how easy it is to code and lines of code produced by the tools. This first post is the classic Hello World. Check out the comments as well. iPhone SDK vs. Windows Phone 7 Series SDK Challenge, Part 2: MoveMe Shawn Burke's part 2 is comparing the classic iPhone 'MoveMe' app... again, check out all the comments. Silverlight 4 : Indic Support in Silverlight Vikram Pendse demonstrates using the Microsoft Indic Language Input tool. He has some screen shots and discussion about fonts in Silverlight. Comparison of HTTP polling duplex and net.tcp performance in Silverlight 4 RC Tomasz Janczuk is checking out Silverlight4 RC and has a comparison up of the performance of the three mechanisms for asynch data push for the server to the client/. Summary rows in Datagrid with multiple groups Lee revisted a post that displayed Summary/Totals in the group header to also support multiple groups now. Silverlight Commands Hacks: Passing EventArgs as CommandParameter to DelegateCommand triggered by EventTrigger Alexey Zakharov suggests a workaround 'InvokeDelegateCommandAction' to keep Blend from ignoring event args. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Trabajando el redireccionamiento de usuarios/Working with user redirect methods

    - by Jason Ulloa
    La protección de las aplicaciones es un elemento que no se puede dejar por fuera cuando se elabora un sistema. Cada parte o elemento de código que protege nuetra aplicación debe ser cuidadosamente seleccionado y elaborado. Una de las cosas comunes con las que nos topamos en asp.net cuando deseamos trabajar con usuarios, es con la necesidad de poder redireccionarlos a los distintos elementos o páginas dependiendo del rol. Pues precisamente eso es lo que haremos, vamos a trabajar con el Web.config de nuestra aplicación y le añadiremos unas pequeñas líneas de código para lograr dar un poco mas de seguridad al sistema y sobre todo lograr el redireccionamiento. Así que veamos como logramos lo deseado: Como bien sabemos el web.config nos permite manejar muchos elementos dentro de asp.net, muchos de ellos relacionados con la seguridad, asi como tambien nos brinda la posibilidad de poder personalizar los elementos para poder adaptarlo a nuestras necesidades. Así que, basandonos en el principio de que podemos personalizar el web.config, entonces crearemos una sección personalizada, que será la que utilicemos para manejar el redireccionamiento: Nuestro primer paso será ir a nuestro web.config y buscamos las siguientes líneas: <configuration>     <configSections>  </sectionGroup>             </sectionGroup>         </sectionGroup> Y luego de ellas definiremos una nueva sección  <section name="loginRedirectByRole" type="crabit.LoginRedirectByRoleSection" allowLocation="true" allowDefinition="Everywhere" /> El section name corresponde al nombre de nuestra nueva sección Type corresponde al nombre de la clase (que pronto realizaremos) y que será la encargada del Redirect Como estamos trabajando dentro de la seccion de configuración una vez definidad nuestra sección personalizada debemos cerrar esta sección  </configSections> Por lo que nuestro web.config debería lucir de la siguiente forma <configuration>     <configSections>  </sectionGroup>             </sectionGroup>         </sectionGroup> <section name="loginRedirectByRole" type="crabit.LoginRedirectByRoleSection" allowLocation="true" allowDefinition="Everywhere" /> </configSections> Anteriormente definimos nuestra sección, pero esta sería totalmente inútil sin el Metodo que le da vida. En nuestro caso el metodo loginRedirectByRole, este metodo lo definiremos luego del </configSections> último que cerramos: <loginRedirectByRole>     <roleRedirects>       <add role="Administrador" url="~/Admin/Default.aspx" />       <add role="User" url="~/User/Default.aspx" />     </roleRedirects>   </loginRedirectByRole> Como vemos, dentro de nuestro metodo LoginRedirectByRole tenemos el elemento add role. Este elemento será el que posteriormente le indicará a la aplicación hacia donde irá el usuario cuando realice un login correcto. Así que, veamos un poco esta configuración: add role="Administrador" corresponde al nombre del Role que tenemos definidio, pueden existir tantos elementos add role como tengamos definidos en nuestra aplicación. El elemento URL indica la ruta o página a la que será dirigido un usuario una vez logueado y dentro de la aplicación. Como vemos estamos utilizando el ~ para indicar que es una ruta relativa. Con esto hemos terminado la configuración de nuestro web.config, ahora veamos a fondo el código que se encargará de leer estos elementos y de utilziarlos: Para nuestro ejemplo, crearemos una nueva clase denominada LoginRedirectByRoleSection, recordemos que esta clase es la que llamamos en el elemento TYPE definido en la sección de nuestro web.config. Una vez creada la clase, definiremos algunas propiedades, pero antes de ello le indicaremos a nuestra clase que debe heredar de configurationSection, esto para poder obtener los elementos del web.config.  Inherits ConfigurationSection Ahora nuestra primer propiedad   <ConfigurationProperty("roleRedirects")> _         Public Property RoleRedirects() As RoleRedirectCollection             Get                 Return DirectCast(Me("roleRedirects"), RoleRedirectCollection)             End Get             Set(ByVal value As RoleRedirectCollection)                 Me("roleRedirects") = value             End Set         End Property     End Class Esta propiedad será la encargada de obtener todos los roles que definimos en la metodo personalizado de nuestro web.config Nuestro segundo paso será crear una segunda clase (en la misma clase LoginRedirectByRoleSection) a esta clase la llamaremos RoleRedirectCollection y la heredaremos de ConfigurationElementCollection y definiremos lo siguiente Public Class RoleRedirectCollection         Inherits ConfigurationElementCollection         Default Public ReadOnly Property Item(ByVal index As Integer) As RoleRedirect             Get                 Return DirectCast(BaseGet(index), RoleRedirect)             End Get         End Property         Default Public ReadOnly Property Item(ByVal key As Object) As RoleRedirect             Get                 Return DirectCast(BaseGet(key), RoleRedirect)             End Get         End Property         Protected Overrides Function CreateNewElement() As ConfigurationElement             Return New RoleRedirect()         End Function         Protected Overrides Function GetElementKey(ByVal element As ConfigurationElement) As Object             Return DirectCast(element, RoleRedirect).Role         End Function     End Class Nuevamente crearemos otra clase esta vez llamada RoleRedirect y en este caso la heredaremos de ConfigurationElement. Nuestra nueva clase debería lucir así: Public Class RoleRedirect         Inherits ConfigurationElement         <ConfigurationProperty("role", IsRequired:=True)> _         Public Property Role() As String             Get                 Return DirectCast(Me("role"), String)             End Get             Set(ByVal value As String)                 Me("role") = value             End Set         End Property         <ConfigurationProperty("url", IsRequired:=True)> _         Public Property Url() As String             Get                 Return DirectCast(Me("url"), String)             End Get             Set(ByVal value As String)                 Me("url") = value             End Set         End Property     End Class Una vez que nuestra clase madre esta lista, lo unico que nos queda es un poc de codigo en la pagina de login de nuestro sistema (por supuesto, asumo que estan utilizando  los controles de login que por defecto tiene asp.net). Acá definiremos nuestros dos últimos metodos  Protected Sub ctllogin_LoggedIn(ByVal sender As Object, ByVal e As System.EventArgs) Handles ctllogin.LoggedIn         RedirectLogin(ctllogin.UserName)     End Sub El procedimiento loggeding es parte del control login de asp.net y se desencadena en el momento en que el usuario hace loguin correctametne en nuestra aplicación Este evento desencadenará el siguiente procedimiento para redireccionar.     Private Sub RedirectLogin(ByVal username As String)         Dim roleRedirectSection As crabit.LoginRedirectByRoleSection = DirectCast(ConfigurationManager.GetSection("loginRedirectByRole"), crabit.LoginRedirectByRoleSection)         For Each roleRedirect As crabit.RoleRedirect In roleRedirectSection.RoleRedirects             If Roles.IsUserInRole(username, roleRedirect.Role) Then                 Response.Redirect(roleRedirect.Url)             End If         Next     End Sub   Con esto, nuestra aplicación debería ser capaz de redireccionar sin problemas y manejar los roles.  Además, tambien recordar que nuestro ejemplo se basa en la utilización del esquema de bases de datos que por defecto nos proporcionada asp.net.

    Read the article

  • Liberado Visual Studio 2010 Feature Pack y Power Tools

    - by carlone
      Estimados amig@s, El lunes recien pasado, fue liberado a la web (Release to Web RTW) el primer paquete de Visual Studio Feature Pack, el cual incluye Microsoft Visual Studio 2010 Visualization and Modeling Feature Pack y el Visual Studio 2010 Productivity Powertools. Realmente son dos herramientas muy poderosas de las cuales pueden obtener beneficio sobre todo en términos de eficiencia y productividad a la hora de estar haciendo programación. Visual Studio 2010 Productivity Powertools En palabras simples, esta herramienta es un conjunto de extensiones para visual studio (versión Professional para arriba), para mejorar la productividad de los programadores. Dentro de las muchas características que ofrece, podemos resaltar: Mejoras a la visualización dentro de los tabs en Visual Studio, lo cual incluye Scrollable Tabs Vertical Tabs Pinned Tabs Ventana de dialog para añadir referencias a un proyecto más eficiente y con capacidad de búsqueda Sobresaltar o marcar la línea actual (Muy útil para en monitores de alta resolución) HTML Copy, que permite copiar el código sin perder el formato Ctrl + Click Go to definition, esta es una característica que permite que al presionar la tecla control podamos ubicar hipervínculos para navegar a la definición de un símbolo. Alineación del código cuando hacemos asignación de valores Bien si de dan cuenta, son muchas las características que pueden aprovechar para mejorar su experiencia de programación dentro del entorno de Visual Studio 2010. Para descargar el instalador y obtener más información dirigirse al website: http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef   Microsoft Visualization and Modeling Feature Pack A través de esta herramienta podrás sacar mucho provecho para desarrollar modelos basados en UML. Nota: Este paquete esta limitado a suscriptores de MSDN y se puede descargar únicamente desde el sitio de descargas para suscriptores de MSDN. Es pre requisito tener la versión Visual Studio 2010 Ultimate para utilizar esta herramienta. Dentro de las muchas características ofrecidas, podemos resaltar: Generación de código a partir de diagramas UML Crear diagramas UML a partir del código (Ej: generar un diagrama de secuencia en base al código de su aplicación) Generar gráficas de dependencias de proyectos web Importar elementos de modelos de clase, secuencia y casos de uso de archivos XMI 2.1 Aunque esta limitada a la versión Ultimate, con esta herramienta los Arquitectos de Software y los jefes de desarrollo tendrán la posibilidad de poder controlar y diseñar mejor sus aplicaciones. Si desean ver la documentación, videos y descargar el pack pueden dirigirse a:  http://msdn.microsoft.com/en-us/vstudio/ff655021.aspx   Espero que estas herramientas les sean de mucho provecho!   Saludos, Carlos A. Lone Sigueme en Twitter @carloslonegt

    Read the article

  • Gestire la relazione con il fornitore: strategie, processi, strumenti

    - by antonella.buonagurio(at)oracle.com
    Si é svolto il 3 Marzo un interessante incontro sul tema delle relazioni fra fornitori ed ufficio acquisti. Cesare Businelli , Direttore Generale Italia dell' European Institute of Purchasing Management ha illustrato, in un tempo purtoppo inferiore al necessario, come gestire le relazioni e la collaborazione con i fornitori strategici per creare valore, portando numerosi esempi di successo e stimolando l'uditorio, composto dai responsabili acquisti di piu di 20 aziende. A seguire Lino Campofiorito - Procurement Solutions Sales Consultant di Oracle ha illustrato alcune delle soluzioni informatiche a supporto. Qui potrete trovare le slides. Al termine dell'incontro molte domande per i relatori a conferma dell'interesse del tema.  Oracle Procurement Channel View more presentations from antobng82.

    Read the article

  • Oracle allo SMAU 2012 - La strategia CRM e l’approccio alla Customer Experience: perchè le aziende devono servire diversamente i propri clienti.

    - by Silvia Valgoi
    Lo scorso 18 Ottobre Oracle è stata presente all'edizione milanese di SMAU 2012 all'interno della Apps & Cloud Arena. Invitata da AISM (Associazione italiana marketing) Oracle  ha avuto l’opportunità di partecipare attivamente con un intervento all’interno dell’area tematica “Gestire efficacemente i propri clienti attraverso le applicazioni di Customer Relationship Management”. Le molte persone presenti hanno potuto ascoltare dove, secondo Oracle, si genera reale differenziazione del brand – al di là dei processi ormai consolidati di marketing , vendita e servizio al cliente – e dove si posiziona il nuovo valore per il business. Se non hai potuto partecipare guarda qui la presentazione di Oracle. Per maggiori informazioni: Silvia Valgoi

    Read the article

  • Complexity of a web application

    - by Dominik G
    I am currently writing my Master's Thesis on maintainability of a web application. I found some methods like the "Maintainability Index" by Coleman et.al. or the "Software Maintainability Index" by Muthanna et.al. For both of them one needs to calculate the cyclomatic complexity. So my question is: Is it possible to measure the cyclomatic complexity of a web application? In my opinion there are three parts to a web application: Server code (PHP, C#, Python, Perl, etc.) Client code (JavaScript) HTML (links and forms as operators, GET-parameters and form fields as operands!?) What do you think? Is there another point of view on the complexity of web application? Did I miss something?

    Read the article

  • Estudio de caso: CFO de At&T le apunta a la tecnología para transformar las Finanzas Globales

    - by RED League Heroes-Oracle
    AT&T es una de las pocas multinacionales modernas que han participado de todas las etapas anteriores de la innovación de las telecomunicaciones, de Alexander Graham Bell como inventor solitario, a Bell Labs, a los lanzamientos acelerados en las fundiciones de AT&T. La tecnología es el corazón de todo lo que AT&T hace, incluyendo sus inversiones en innovaciones tecnológicas para permitir que las finanzas de AT&T trabajen más estratégicamente con los negocios para asegurar que las inversiones en las iniciativas de crecimiento sean exitosas. Según John Stephens, Vicepresidente Ejecutivo y director financiero de AT&T, la empresa ha trazado un plan de inversión de tres años para mejorar y aumentar sus redes IP de banda ancha alámbricas e inalámbricas. El plan incluye la implementación del servicio 4G LTE para 300 millones de personas en los Estados Unidos, expansión de IP de banda ancha de alta velocidad a unos 57 millones de hogares de clientes y una expansión de la fibra a 1 millón de clientes corporativos adicionales en su área de servicio de telefonía fija. "La necesidad de velocidad es mayor que nunca, y este proyecto es nuestro paso hacia la innovación para ofrecer tal velocidad," dice Stephens. Como AT&T moderniza su infraestructura global, sus procesos operacionales se hacen tan poderosos como su red. Ha sido una tarea grande y compleja, pero Stephens se complace al decir que el departamento de finanzas de AT&T ha adoptado su papel de catalizador corporativo. Empezó con un concepto simple: "Vamos a hacer que todos hablen en el mismo idioma". Esto llevó a la consolidación de sistemas financieros heredados de las empresas adquiridas. No fue una tarea sencilla, dado que la empresa pasó por más de cinco adquisiciones importantes y un sinfín de otras transacciones. En 2007, AT&T tenía 17 aplicaciones apenas en la función de cuentas por pagar. Hoy, el número se ha reducido a dos. Asimismo, hubo 50 sistemas de reportes gerenciales oficiales y ahora hay tres, con planes de excluir uno de ellos. Al tener un único lenguaje volcado a las Finanzas en toda la empresa, el equipo de finanzas de AT&T ha eliminado las varias versiones de los mismos datos, reduciendo la posible confusión en las discusiones y en las decisiones de estrategia de negocios. Estos pasos también han reducido los costos y aceleraron la toma de decisiones. "Lo lindo de los sistemas es que permiten que la gente talentosa con habilidades analíticas usen su tiempo en esa zona, en vez de gastar tiempo en recolección, agregación y organización de los datos," señala Stephens. "Tenemos un proceso eficiente y eficaz que hace que nosotros, dejemos a la gente libre para dedicarse a aquello en que son realmente buenos. Y tenemos un equipo de alta calidad y ellos están en su mejor punto cuando son capaces de hacer su función para apoyar a la unidad de negocio”AT&T es una de las pocas multinacionales modernas que han participado de todas las etapas anteriores de la innovación de las telecomunicaciones, de Alexander Graham Bell como inventor solitario, a Bell Labs, a los lanzamientos acelerados en las fundiciones de AT&T. La tecnología es el corazón de todo lo que AT&T hace, incluyendo sus inversiones en innovaciones tecnológicas para permitir que las finanzas de AT&T trabajen más estratégicamente con los negocios para asegurar que las inversiones en las iniciativas de crecimiento sean exitosas.  Según John Stephens, Vicepresidente Ejecutivo y director financiero de AT&T, la empresa ha trazado un plan de inversión de tres años para mejorar y aumentar sus redes IP de banda ancha alámbricas e inalámbricas. El plan incluye la implementación del servicio 4G LTE para 300 millones de personas en los Estados Unidos, expansión de IP de banda ancha de alta velocidad a unos 57 millones de hogares de clientes y una expansión de la fibra a 1 millón de clientes corporativos adicionales en su área de servicio de telefonía fija. "La necesidad de velocidad es mayor que nunca, y este proyecto es nuestro paso hacia la innovación para ofrecer tal velocidad," dice Stephens. Como AT&T moderniza su infraestructura global, sus procesos operacionales se hacen tan poderosos como su red. Ha sido una tarea grande y compleja, pero Stephens se complace al decir que el departamento de finanzas de AT&T ha adoptado su papel de catalizador corporativo. Empezó con un concepto simple: "Vamos a hacer que todos hablen en el mismo idioma". Esto llevó a la consolidación de sistemas financieros heredados de las empresas adquiridas. No fue una tarea sencilla, dado que la empresa pasó por más de cinco adquisiciones importantes y un sinfín de otras transacciones. En 2007, AT&T tenía 17 aplicaciones apenas en la función de cuentas por pagar. Hoy, el número se ha reducido a dos. Asimismo, hubo 50 sistemas de reportes gerenciales oficiales y ahora hay tres, con planes de excluir uno de ellos. Al tener un único lenguaje volcado a las Finanzas en toda la empresa, el equipo de finanzas de AT&T ha eliminado las varias versiones de los mismos datos, reduciendo la posible confusión en las discusiones y en las decisiones de estrategia de negocios. Estos pasos también han reducido los costos y aceleraron la toma de decisiones. "Lo lindo de los sistemas es que permiten que la gente talentosa con habilidades analíticas usen su tiempo en esa zona, en vez de gastar tiempo en recolección, agregación y organización de los datos," señala Stephens. "Tenemos un proceso eficiente y eficaz que hace que nosotros, dejemos a la gente libre para dedicarse a aquello en que son realmente buenos. Y tenemos un equipo de alta calidad y ellos están en su mejor punto cuando son capaces de hacer su función para apoyar a la unidad de negocio”

    Read the article

  • Az OTP Bank az Oracle Warehouse Builder-t használja

    - by Fekete Zoltán
    Az Oracle.com-on az ügyfél sikertörténetek között az imént jelent meg a következo dokumentum: OTP Bank Data Warehouse Development Team Improves Service Level and Lowers Reporting Lead Time for Business Fields by 80%, azaz az OTP Bank az adattárház fejlesztéshez az Oracle Warehouse Builder ETL-ELT eszközt használja. AZ OTP Bank Tranzakciós Adattárház fejleszto csapata magasabb minoségi szintre emelte a belso megrendeloknek nyújtott szoltáltatásait, amely egyik eredménye, hogy 80%-al csökkentette az üzletágak közötti riportolási folyamatok átfutási idotartamát. A magyar nyelvu sikertörténet innen töltheto le. A legfontosabb eredmények az OWB kapcsán: - ETL folyamatok sztenderdizációján keresztül elért adatminoség javulás, OWB - Oracle Business Intelligence EE: az üzleti területek és az IT fejlesztés közötti együttmoködés hatékonyabb - sztenderdizált ETL és riportolási folyamatok: - fix jelentés készletek hatására tudatos üzleti metaadat kezelés - egységes terminológia - komplex banki folyamatok pontos ismerete: üzleti területek és IT fejlesztok számára - hatékony banki együttmoködés - a megrendeléstol az adatpublikációig tartó folyamatok idotartama lecsökkent - az ad-hoc riportok elkészítése a korábbi 1,5 hétrol 80%-al, átlagosan 2 munkanapra csökkent

    Read the article

  • Oracle Applications Day 2012. Experience the Global Innovation of Management Applications

    - by antonella.buonagurio
    10 ottobre 2012 – Milano, East End Studios | 17 ottobre 2012 - Roma, Officine Farneto Sono aperte le iscrizioni per partecipare agli appuntamenti dedicati alla comunità di Clienti e Partner: un’occasione imperdibile a Milano e Roma per condividere le soluzioni più innovative e le esperienze più significative sulle scelte strategiche per affrontare le sfide attuali e future. Iscriviti sul sito sito Oracle Applications Day 2012 ti offre l’opportunità di partecipare al concorso fotografico Oracle I.M.A.G.E. e vincere un iPad! Scatta le immagini che per te descrivono i cinque concept dell’evento (Innovation, Management, Applications, Global, Experience) ed inviale tramite il tuo smartphone. Per partecipare al contest visita la pagina Concorso sul sito E non dimenticare ORACLE RED! Diventa protagonista della comunicazione visiva dell’Oracle Applications Day: scatta la tua immagine Red Oracle e postala su INSTAGRAM con il cancelletto/hashtag #OracleApps_Red. Le tue foto potranno diventare lo slideshow che verrà proiettato in apertura dei lavori. Per ulteriori informazioni visita il sito Non perdere l’evento più “social cool” dell’anno! Il Team Oracle

    Read the article

  • No me arranca ubuntu 12.04

    - by MAgnum
    Buenos Dias, Tengo un Notebook Intel(R) Atom(TM) CPU N270 1.60GHz Version de la BIOS Intel V1585, tenia un sistema operativo de windows xp e intente instalar ubunto 12.04 por medio de live USB debido a que no tengo la adaptación de CD segui todos los pasos y le di instalar completamente formateando el sistema anterior, terminando la instalacion me salio un problema que no encontraba el sistema de arranque o algo asi el hecho es que me salia algo de SDA donde aparecia el modelo del HDD y como es Hitachi HTS543212L9A300 le di en esa y le di finalizar, pero al reiniciar cuando debe iniciar el sistema operativo se queda en negro y no carga nada =S he intentado volver a arrancar la usb pero no me deja hacer nada se me traba =S. soy principiante en este sistema operativo y quiera saber que solución me pueden decir para sacarme de este embrollo. tampoco me sale nada despues de usar ctrl+alt+F1 =S... Muchas gracias al alma caritativa que me quiera asesorar =D...

    Read the article

  • Optimal file system type and mount options for an rsnapshot dedicated drive

    - by Nimmy Lebby
    We have an external USB 2 drive that we are using as a backup drive for our configuration. We use rsnapshot for the backups. It uses a few standard commands for managing snapshots: rm -rf: deletes expired snapshots mv: moves older snapshots down a slot cp -al: duplicates last snapshot to new slot rsync -a --delete --numeric-ids --relative: synchronizes new snapshot As you could see by the log below, the majority of the time is spent on the rm -rf and the cp -al steps: [25/Dec/2010:14:00:02] rsnapshot hourly: started [25/Dec/2010:14:00:02] echo 21012 > /var/run/rsnapshot.pid [25/Dec/2010:14:00:02] rm -rf /mnt/extdrive/snapshots/hourly.5/ [25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.4/ /mnt/extdrive/snapshots/hourly.5/ [25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.3/ /mnt/extdrive/snapshots/hourly.4/ [25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.2/ /mnt/extdrive/snapshots/hourly.3/ [25/Dec/2010:14:15:48] mv /mnt/extdrive/snapshots/hourly.1/ /mnt/extdrive/snapshots/hourly.2/ [25/Dec/2010:14:15:48] cp -al /mnt/extdrive/snapshots/hourly.0 /mnt/extdrive/snapshots/hourly.1 [25/Dec/2010:14:23:32] rsync -a --delete --numeric-ids --relative /etc /mnt/extdrive/snapshots/hourly.0/sm4/ [25/Dec/2010:14:23:52] touch /mnt/extdrive/snapshots/hourly.0/ [25/Dec/2010:14:23:52] rm -f /var/run/rsnapshot.pid [25/Dec/2010:14:23:52] rsnapshot hourly: completed successfully My questions: I'm currently using ext4 for the filesystem. Maybe this is not the best choice from those available in Red Hat. Anyone have any recommendations that would speed up the process? The partition's mount options are sync,dirsync 1 2. Is there a way to optimize this since it's solely used for rsnapshot? Of course, reasoning would be greatly appreciated.

    Read the article

  • Symlink path can be followed manually, but `cd` returns Permission denied

    - by Ricket
    I am trying to access the directory /usr/software/test/agnostic. There are several symlinks involved in this path. As you can see by the below transcript, I am unable to cd directly to the path, but I can check each step of the way and cd to the symlinked directories until I reach the destination. Why is this? (and how do I fix it?) Ubuntu 12.10, bash > ls /usr/software/test/agnostic ls: cannot access /usr/software/test/agnostic: Permission denied > cd /usr/software/test > cd agnostic bash: cd: agnostic: Permission denied > pwd -P /x/eng/localtest/arch/x86_64-redhat-rhel5 > ls -al | grep agnostic lrwxrwxrwx 1 root root 15 Oct 23 2007 agnostic -> noarch/agnostic > ls -al | grep noarch ... lrwxrwxrwx 1 root root 23 Oct 23 2007 noarch -> /x/eng/localtest/noarch > cd noarch > cd agnostic bash: cd: agnostic: Permission denied > ls -al | grep agnostic lrwxrwxrwx 1 5808 dip 4 Oct 5 2010 agnostic -> main > cd main > ls (correct output of `ls`) > pwd /usr/software/test/noarch/main > pwd -P /x/eng/localtest/noarch/main

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >