Search Results

Search found 466 results on 19 pages for 'ansi c'.

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

  • how to read a string from a \n delimited file

    - by Matias
    I'm trying to read a return delimited file. full of phrases. I'm trying to put each phrase into a string. The problem is that when I try to read the file with fscanf(file,"%50s\n",string); the string only contains one word. when it bumps with a space it stops reading the string

    Read the article

  • Shell Prompt Line Wrapping Issue

    - by Rob
    I've done something to break my Bash Shell Prompt in OS X (10.5.7) Terminal. This is the PS1 that I had configured: PS1='\[\e[1;32m\]\h\[\e[0m\]:\[\e[1;34m\]\w\[\e[0m\]\$ ' As far as I can tell I have the color commands escaping correctly. However when I scroll up and down in my command history I often get line wrapping issues if the historic commands wrap onto multiple lines. I simplified my prompts to the following: PS1='\[\e[1m\]\h:\w\$ \[\e[0m\]' PS2='> ' And I still see something like: localhost:~/Library/Application Support/Firefox/Profiles/knpmxpup.Defau lt/extensions/{1A2D0EC4-75F5-4c91-89C4-3656F6E44B68}$ expocd \{1A2D0EC4-7 5F5-4c91-89C4-3656F6E export PS1="\[ \e[1;32m\]\h\[\e[0m\]: cd Library/Appl ication\ Support/ I've also tried \033 instead of \e. I just included PS2 up there for information, I haven't changed that from the install default. If I completely remove the color codes then everything works fine, any ideas?

    Read the article

  • Is this bad coding practice?

    - by user566540
    I'm using PC-lint to analyze my code and theese lines are generating several errors. That makes me wonder if my coding pratice is wrong? char *start; char *end; // Extract the phone number start = (char*) (strchr(data, '\"') +1); end = (char*) strchr(start, '\"'); *end = 0; strlcpy((char*)Fp_smsSender, start , start-(end-1)); EDIT: After your help i now have: char *start; char *end; if (data != NULL) { // Extract the phone number start = strchr(data, '\"'); if (start != NULL) { ++start; end = strchr(start, '\"'); if (end != NULL) { *end = 0; strlcpy((char*)Fp_smsSender, start , FP_MAX_PHONE); } } How does that look?

    Read the article

  • ANSI C as core of a C# project? Is this possible?

    - by Nektarios
    I'm writing a NON-GUI app which I want to be cross platform between OS X and Windows. I'm looking at the following architecture, but I don't know if it will work on the windows side: (Platform specific entry point) - ANSI C main loop = ANSI C model code doing data processing / logic = (Platform specific helpers) So the core stuff I'm planning to write in regular ANSI C, because A) it should be platform independent, B) I'm extremely comfortable with C, C) It can do the job and do it well (Platform specific entry point) can be written in whatever necessary to get the job done, this is a small amount of code, doesn't matter to me. (Platform specific helpers) is the sticky thing. This is stuff like parsing XML, accessing databases, graphics toolkit stuff, whatever. Things that aren't easy in C. Things that modern languages/frameworks will give for free. On OS X this code will be written in Objective-C interfacing with Cocoa. On Windows I'm thinking my best bet is to use C# So on Windows my architecture (simplified) looks like (C# or C?) - ANSI C - C# Is this possible? Some thoughts/suggestions so far.. 1) Compile my C core as a .dll -- this is fine, but seems there's no way to call my C# helpers unless I can somehow get function pointers and pass them to my core, but that seems unlikely 2) Compile a C .exe and a C# .exe and have them talk via shared memory or some kind of IPC. I'm not entirely opposed to this but it obviously introduces a lot of complexity so it doesn't seem ideal 3) Instead of C# use C++, it gets me some nice data management stuff and nice helper code. And I can mix it pretty easily. And the work I do could probably easily port to Linux. But I really don't like C++, and I don't want this to turn in to a 3rd-party-library-fest. Not that it's a huge deal, but it's 2010.. anything for basic data management should be built in. And targetting Linux is really not a priority. Note that no "total" alternatives are OK as suggested in other similar questions on SO I've seen; java, RealBasic, mono.. this is an extremely performance intensive application doing soft realtime for game/simulation purposes, I need C & friends here to do it right (maybe you don't, but I do)

    Read the article

  • ANSI or OEM Codepage when using MME and DirectMusic?

    - by Carl Seleborg
    Hello, I noticed that when reading MIDI port names from MME, the names are multi-byte strings encoded using the ANSI Codepage, which my app uses by default. When receiving those names from the DirectMusic driver, the names are wide-character strings encoded with the OEM Codepage. See this article by Raymond Chen for a quick refresher on Codepages. On my German system, this means that when using the current codepage, which turns out to be the ANSI one, I get "Audiogerät" from MME, and "Audiogeröt" from DirectMusic, the latter being wrong. This gets fixed when I treat that last name as OEM-encoded instead. So how do I know with which codepage to decode those names? Why does the name coming from DirectMusic get encoded differently? Does it come from the USB driver? The COM framework? DirectMusic? How can I know for sure which codepage to use when reading the names of my MIDI ports? For info: I use the MultiByteToWideChar() and WideCharToMultiByte() functions to perform the conversions, with CP_ACP and CP_OEMCP as argument for the codepage to use. I use midiInGetDeviceCaps() to get MIDI port information from the MME subsystem... ... and convert MIDIINCAPS.szPname using the CP_ACP (ANSI) codepage. I use IID_IDirectMusic8::EnumPort() to get port information from DirectMusic... ... and convert DMUS_PORTCAPS.wszDescription using the CP_OEMCP codepage.

    Read the article

  • Why isn't UTF-8 allowed as the "ANSI" code page?

    - by dan04
    The Windows _setmbcp function allows any valid code page... (except UTF-7 and UTF-8, which are not supported) OK, not supporting UTF-7 makes sense: Characters have non-unique representations and that introduces complexity and security risks. But why not UTF-8? As I understand it, the "ANSI" versions of the Windows API functions convert their arguments to UTF-16, call the equivalent "W" function, and convert any strings in the output to "ANSI". This is what I've been doing manually. So why can't Windows do it for me?

    Read the article

  • Visual Studio 2010: Is it possible to force editor to use ANSI rather than UTF-8?

    - by Mark Redman
    I am having issues with some files in automated processes, specifically with batch files and sql files. Visual Studio seems to create these as UTF-8 rather than ansi and adds some kind of special characters to the beginning of the file (I think this is a called a pre-amble) This breaks running batch files and running swl files through osql.exe. I have had issues myself in the past in creating text files using C#, but can get around that through encoding. However its seems a bit strange I cant use Visual studio to create batch files and sql files in a database project for automation.

    Read the article

  • How do I import and call unmanaged C dll with ansi string "char *" pointer string from VB.net?

    - by Warren P
    I have written my own function, which in C would be declared like this, using standard Win32 calling conventions: int Thing( char * command, char * buffer, int * BufSize); I have the following amount of VB figured out, which should import the dll and call this function, wrapping it up to make it easy to call Thing("CommandHere",GetDataBackHere): Imports Microsoft.VisualBasic Imports System.Runtime.InteropServices Imports System Imports System.Text Namespace dllInvocationSpace Public Class dllInvoker ' tried attributes but could not make it build: ' <DllImport("Thing1.dll", False, CallingConvention.Cdecl, CharSet.Ansi, "Baton", True, True, False, True)> Declare Ansi Function Thing Lib "Thing1.dll" (ByVal Command As String, ByRef Buffer As String, ByRef BufferLength As Integer) Shared Function dllCall(ByVal Command As String, ByRef Results As String) As Integer Dim Buffer As StringBuilder = New StringBuilder(65536) Dim retCode As Integer Dim bufsz As Integer bufsz = 65536 retCode = Thing(Command, Buffer, bufsz) Results = Buffer Return retCode End Function End Class End Namespace The current code doesn't build, because although I think I should be able to create a "buffer" that the C Dll can write data back into using a string builder, I haven't got it quite right. (Value of type System.Text.STringBuilder cannot be converted to 'String'). I have looked all over the newsgroups and forums and can not find an example where the C dll needs to pass between 1 and 64kbytes of data back (char *buffer, int bufferlen) to visual basic.net.

    Read the article

  • Mismatch between the program and library build versions detected

    - by Alex Farber
    I built wxWidgets on Linux using this command: ../configure --enable-shared --disable-debug It see results of this build: /usr/local/lib/wx/config/gtk2-ansi-release-2.8 /usr/local/lib/wx/include/gtk2-ansi-release-2.8/wx/setup.h wx-config output: alex@alex-linux:~$ wx-config --list Default config is gtk2-ansi-release-2.8 Default config will be used for output Alternate matches: gtk2-ansi-debug-2.8 gtk2-ansi-debug-static-2.8 gtk2-ansi-release-static-2.8 alex@alex-linux:~$ wx-config --cppflags --release 2.8 -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ alex@alex-linux:~$ wx-config --libs --release 2.8 -L/usr/local/lib -pthread -lwx_gtk2_richtext-2.8 -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8 Now I am trying to build Hello wxWidgets program with Release version: g++ -I/usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ hello.cpp -o hello -L/usr/local/lib -pthread -lwx_gtk2_richtext-2.8 -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8 It compiles and runs successfully on my computer. Program dependencies: ldd hello linux-gate.so.1 = (0x006ef000) libwx_gtk2_richtext-2.8.so.0 = /usr/local/lib/libwx_gtk2_richtext-2.8.so.0 (0x00253000) libwx_gtk2_aui-2.8.so.0 = /usr/local/lib/libwx_gtk2_aui-2.8.so.0 (0x005ff000) libwx_gtk2_xrc-2.8.so.0 = /usr/local/lib/libwx_gtk2_xrc-2.8.so.0 (0x00110000) libwx_gtk2_qa-2.8.so.0 = /usr/local/lib/libwx_gtk2_qa-2.8.so.0 (0x00a3c000) libwx_gtk2_html-2.8.so.0 = /usr/local/lib/libwx_gtk2_html-2.8.so.0 (0x0019d000) libwx_gtk2_adv-2.8.so.0 = /usr/local/lib/libwx_gtk2_adv-2.8.so.0 (0x00c18000) libwx_gtk2_core-2.8.so.0 = /usr/local/lib/libwx_gtk2_core-2.8.so.0 (0x00ef8000) libwx_base_xml-2.8.so.0 = /usr/local/lib/libwx_base_xml-2.8.so.0 (0x0047e000) libwx_base_net-2.8.so.0 = /usr/local/lib/libwx_base_net-2.8.so.0 (0x00353000) libwx_base-2.8.so.0 = /usr/local/lib/libwx_base-2.8.so.0 (0x006f0000) ... Now I want to execute this program on another computer without wxWidgets installed. I copy the program and all shared libraries to another computer: hello libwx_gtk2_core-2.8.so libwx_base-2.8.so libwx_gtk2_core-2.8.so.0 libwx_base-2.8.so.0 libwx_gtk2_core-2.8.so.0.6.0 libwx_base-2.8.so.0.6.0 libwx_gtk2_html-2.8.so libwx_base_net-2.8.so libwx_gtk2_html-2.8.so.0 libwx_base_net-2.8.so.0 libwx_gtk2_html-2.8.so.0.6.0 libwx_base_net-2.8.so.0.6.0 libwx_gtk2_qa-2.8.so libwx_base_xml-2.8.so libwx_gtk2_qa-2.8.so.0 libwx_base_xml-2.8.so.0 libwx_gtk2_qa-2.8.so.0.6.0 libwx_base_xml-2.8.so.0.6.0 libwx_gtk2_richtext-2.8.so libwx_gtk2_adv-2.8.so libwx_gtk2_richtext-2.8.so.0 libwx_gtk2_adv-2.8.so.0 libwx_gtk2_richtext-2.8.so.0.6.0 libwx_gtk2_adv-2.8.so.0.6.0 libwx_gtk2_xrc-2.8.so libwx_gtk2_aui-2.8.so libwx_gtk2_xrc-2.8.so.0 libwx_gtk2_aui-2.8.so.0 libwx_gtk2_xrc-2.8.so.0.6.0 libwx_gtk2_aui-2.8.so.0.6.0 And run it: LD_LIBRARY_PATH=. ./hello Result: Fatal Error: Mismatch between the program and library build versions detected. The library used 2.8 (debug,ANSI,compiler with C++ ABI 1002,wx containers,compatible with 2.6), and your program used 2.8 (no debug,ANSI,compiler with C++ ABI 1002,wx containers,compatible with 2.6). ./run.sh: line 1: 1810 Aborted LD_LIBRARY_PATH=. ./hello What is wrong?

    Read the article

  • ANSI SQL question - how to insert or update a record if it already exists?

    - by morpheous
    Although I am using mySQL (for now), I dont want any DB specific SQL. I am trying to insert a record if it doesn't exist, and update a field if it does exist. I want to use ANSI SQL. The table looks something like this: create table test_table (id int, name varchar(16), weight double) ; //test data insert into test_table (id, name, weight) values(1,'homer', 900); insert into test_table (id, name, weight) values(2,'marge', 85); insert into test_table (id, name, weight) values(3,'bart', 25); insert into test_table (id, name, weight) values(4,'lisa', 15); If the record exists, I want to update the weight (increase by say 10)

    Read the article

  • How do I convert from a possibly Windows 1252 'ANSI' encoded uploaded file to UTF8 in .NET?

    - by qqq123
    I've got a FileUpload control in an ASP.NET web page which is used to upload a file, the contents of which (in a stream) are processed in the C# code behind and output on the page later, using HtmlEncode. But, some of this output is becoming mangled, specifically the symbol '£' is output as the Unicode FFFD REPLACEMENT CHARACTER. I've tracked this down to the input file, which is Windows 1252 ('ANSI') encoded. The question is, How do I determine whether the file is encoded as 1252 or UTF8? It could be either, and How do I convert it to UTF8 if it is in Windows 1252, preserving the symbol £ etc? I've looked online but cannot find a satisfactory answer.

    Read the article

  • Need some clarification on the ANSI/SPARC 3-tier database architecture.

    - by Moonshield
    Hi there, I'm currently revising for a databases exam and looking over some past papers, but there's one question that I'm slightly unsure about and was wondering if someone could offer some assistance. "Describe EACH of the THREE levels of the ANSI SPARC 3 level architecture. Your answer should include the purpose of EACH of the schemas, the level of abstraction they provide and the software tools that would be used to access and support them." As I understand it (although please correct me if I'm wrong): the internal schema specifies the physical storage of the data; the conceptual schema specifies the structure of the database and the domains; and the external schemas are how the database is viewed by "users" (applications, etc.). As for the abstraction, I understand that the conceptual layer means that the physical data storage can be altered without the end user being affected, likewise the The bit that I'm not sure about is what tools are used to access and support each layer. Would the internal schema be handled by the DBMS, the conceptual schema handled by some sort of DDL interpreter and the external schema handled by a DML interpreter (or have I misunderstood what each level does)? Any assistance would be greatly appreciated. Thanks, Moonshield

    Read the article

  • What is the purpose of using -pedantic in GCC/G++ compiler?

    - by huahsin68
    Hi, -ansi: tells the compiler to implement the ANSI language option. This turns off certain "features" of GCC which are incompatible with the ANSI standard. -pedantic: used in conjunction with -ansi, this tells the compiler to be adhere strictly to the ANSI standard, rejecting any code which is not compliant. Text above is extract from this note. First thing first, what is the purpose of usage of -pedantic and -ansi option with GCC/G++ compiler, I couldn't understand the above description. Can anyone tell me the circumstances of using the above two options? When should I use it? Is it important one? THanks @!

    Read the article

  • Oracle bleibt auch 2011 Spitzenreiter im Bereich Datenbanken

    - by Anne Manke
    Mit der Veröffentlichung der aktuellen Ausgabe "Market Share: All Software Markets, Worldwide 2011" bestätigt das weltweit führende Marktanalyseunternehmen Gartner Oracle's Marktführerschaft im Bereich der Relationellen Datenbank Management Systeme (RDBMS). Oracle konnte innerhalb des letzten Jahres seinen Abstand zu seinen Marktbegleitern im Bereich der RDBMS mit einem stabilen Wachstum von 18% sogar ausbauen: der Marktanteil stieg im Jahr 2010 von 48,2% auf 48,8% im Jahr 2011. Damit ist der Abstand zu Oracle's stärkstem Verfolger IBM auf 28,6%.   Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table 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:12.0pt; mso-para-margin-left:0cm; 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;} table.MsoTableLightListAccent2 {mso-style-name:"Light List - Accent 2"; mso-tstyle-rowband-size:1; mso-tstyle-colband-size:1; mso-style-priority:61; mso-style-unhide:no; border:solid #C0504D 1.0pt; mso-border-themecolor:accent2; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; 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-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} table.MsoTableLightListAccent2FirstRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:first-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-shading:#C0504D; mso-tstyle-shading-themecolor:accent2; mso-para-margin-top:0cm; mso-para-margin-bottom:0cm; mso-para-margin-bottom:.0001pt; line-height:normal; color:white; mso-themecolor:background1; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2LastRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:last-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:2.25pt double #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2; mso-para-margin-top:0cm; mso-para-margin-bottom:0cm; mso-para-margin-bottom:.0001pt; line-height:normal; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2FirstCol {mso-style-name:"Light List - Accent 2"; mso-table-condition:first-column; mso-style-priority:61; mso-style-unhide:no; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2LastCol {mso-style-name:"Light List - Accent 2"; mso-table-condition:last-column; mso-style-priority:61; mso-style-unhide:no; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2OddColumn {mso-style-name:"Light List - Accent 2"; mso-table-condition:odd-column; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:1.0pt solid #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2;} table.MsoTableLightListAccent2OddRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:odd-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:1.0pt solid #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2;} Revenue 2010 ($USM) Revenue 2011 ($USM) Growth 2010 Growth 2011 Share 2010 Share 2011 Oracle 9,990.5 11,787.0 10.9% 18.0% 48.2% 48.8% IBM 4,300.4 4,870.4 5.4% 13.3% 20.7% 20.2% Microsoft 3,641.2 4,098.9 10.1% 12.6% 17.6% 17.0% SAP/Sybase 744.4 1,101.1 12.8% 47.9% 3.6% 4.6% Teradata 754.7 882.3 16.9% 16.9% 3.6% 3.7% Source: Gartner’s “Market Share: All Software Markets, Worldwide 2011,” March 29, 2012, By Colleen Graham, Joanne Correia, David Coyle, Fabrizio Biscotti, Matthew Cheung, Ruggero Contu, Yanna Dharmasthira, Tom Eid, Chad Eschinger, Bianca Granetto, Hai Hong Swinehart, Sharon Mertz, Chris Pang, Asheesh Raina, Dan Sommer, Bhavish Sood, Marianne D'Aquila, Laurie Wurster and Jie Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table 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:12.0pt; mso-para-margin-left:0cm; 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;} table.MsoTableLightListAccent2 {mso-style-name:"Light List - Accent 2"; mso-tstyle-rowband-size:1; mso-tstyle-colband-size:1; mso-style-priority:61; mso-style-unhide:no; border:solid #C0504D 1.0pt; mso-border-themecolor:accent2; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; 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-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} table.MsoTableLightListAccent2FirstRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:first-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-shading:#C0504D; mso-tstyle-shading-themecolor:accent2; mso-para-margin-top:0cm; mso-para-margin-bottom:0cm; mso-para-margin-bottom:.0001pt; line-height:normal; color:white; mso-themecolor:background1; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2LastRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:last-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:2.25pt double #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2; mso-para-margin-top:0cm; mso-para-margin-bottom:0cm; mso-para-margin-bottom:.0001pt; line-height:normal; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2FirstCol {mso-style-name:"Light List - Accent 2"; mso-table-condition:first-column; mso-style-priority:61; mso-style-unhide:no; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2LastCol {mso-style-name:"Light List - Accent 2"; mso-table-condition:last-column; mso-style-priority:61; mso-style-unhide:no; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2OddColumn {mso-style-name:"Light List - Accent 2"; mso-table-condition:odd-column; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:1.0pt solid #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2;} table.MsoTableLightListAccent2OddRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:odd-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:1.0pt solid #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2;} Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table 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:12.0pt; mso-para-margin-left:0cm; 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;} table.MsoTableLightListAccent2 {mso-style-name:"Light List - Accent 2"; mso-tstyle-rowband-size:1; mso-tstyle-colband-size:1; mso-style-priority:61; mso-style-unhide:no; border:solid #C0504D 1.0pt; mso-border-themecolor:accent2; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; 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-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} table.MsoTableLightListAccent2FirstRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:first-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-shading:#C0504D; mso-tstyle-shading-themecolor:accent2; mso-para-margin-top:0cm; mso-para-margin-bottom:0cm; mso-para-margin-bottom:.0001pt; line-height:normal; color:white; mso-themecolor:background1; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2LastRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:last-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:2.25pt double #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2; mso-para-margin-top:0cm; mso-para-margin-bottom:0cm; mso-para-margin-bottom:.0001pt; line-height:normal; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2FirstCol {mso-style-name:"Light List - Accent 2"; mso-table-condition:first-column; mso-style-priority:61; mso-style-unhide:no; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2LastCol {mso-style-name:"Light List - Accent 2"; mso-table-condition:last-column; mso-style-priority:61; mso-style-unhide:no; mso-ansi-font-weight:bold; mso-bidi-font-weight:bold;} table.MsoTableLightListAccent2OddColumn {mso-style-name:"Light List - Accent 2"; mso-table-condition:odd-column; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:1.0pt solid #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2;} table.MsoTableLightListAccent2OddRow {mso-style-name:"Light List - Accent 2"; mso-table-condition:odd-row; mso-style-priority:61; mso-style-unhide:no; mso-tstyle-border-top:1.0pt solid #C0504D; mso-tstyle-border-top-themecolor:accent2; mso-tstyle-border-left:1.0pt solid #C0504D; mso-tstyle-border-left-themecolor:accent2; mso-tstyle-border-bottom:1.0pt solid #C0504D; mso-tstyle-border-bottom-themecolor:accent2; mso-tstyle-border-right:1.0pt solid #C0504D; mso-tstyle-border-right-themecolor:accent2;}

    Read the article

  • ANSI C blackjack assignment, linux GCC compiler, i'm stuck...

    - by Bill Adams
    Here's what i have so far... I have yet to figure out how i'm going to handle the 11 / 1 situation with an ace, and when the player chooses an option for hit/stand, i get segfault. HELP!!! #include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> #define DECKSIZE 52 #define VALUE 9 #define FACE 4 #define HANDSIZE 26 typedef struct { int value; char* suit; char* name; }Card; typedef struct { int value; char* suit; char* name; }dealerHand; typedef struct { int value; char* suit; char* name; }playerHand; Card cards[DECKSIZE]; dealerHand deal[HANDSIZE]; playerHand dealt[HANDSIZE]; char *faceName[]={"two","three", "four","five","six", "seven","eight","nine", "ten", "jack","queen", "king","ace"}; char *suitName[]={"spades","diamonds","clubs","hearts"}; void printDeck(){ int i; for(i=0;i<DECKSIZE;i++){ printf("%s of %s value = %d\n ",cards[i].name,cards[i].suit,cards[i].value); if((i+1)%13==0 && i!=0) printf("-------------------\n\n"); } } void shuffleDeck(){ srand(time(NULL)); int this; int that; Card temp; int c; for(c=0;c<10000;c++){ //c is the index for number of individual card shuffles should be set to c<10000 or more this=rand()%DECKSIZE; that=rand()%DECKSIZE; temp=cards[this]; cards[this]=cards[that]; cards[that]=temp; } } /*void hitStand(i,y){ // I dumped this because of a segfault i couldn't figure out. int k; printf(" Press 1 to HIT or press 2 to STAND:"); scanf("%d",k); if(k=1){ dealt[y].suit=cards[i].suit; dealt[y].name=cards[i].name; dealt[y].value=cards[i].value; y++; i++; } } */ int main(){ int suitCount=0; int faceCount=0; int i; int x; int y; int d; int p; int k; for(i=0;i<DECKSIZE;i++){ //this for statement builds the deck if(faceCount<9){ cards[i].value=faceCount+2; }else{ //assigns face cards as value 10 cards[i].value=10; } cards[i].suit=suitName[suitCount]; cards[i].name=faceName[faceCount++]; if(faceCount==13){ //this if loop increments suit count once cards[i].value=11; //all faces have been assigned, and also suitCount++; //assigns the ace as 11 faceCount=0; } //end building deck } /*printDeck(); //prints the deck in order shuffleDeck(); //shuffles the deck printDeck(); //prints the deck as shuffled This was used in testing, commented out to keep the deck hidden!*/ shuffleDeck(); x=0; y=0; for(i=0;i<4;i++){ //this for loop deals the first 4 cards, dealt[y].suit=cards[i].suit; //first card to player, second to dealer, dealt[y].name=cards[i].name; //as per standard dealing practice. dealt[y].value=cards[i].value; i++; y++; deal[x].suit=cards[i].suit; deal[x].name=cards[i].name; deal[x].value=cards[i].value; x++; } printf(" Dealer's hand is: %s of %s and XXXX of XXXX. (Second card is hidden!)\n",deal[0].name,deal[0].suit,deal[1].name,deal[1].suit); printf(" Player's hand is: %s of %s and %s of %s.\n",dealt[0].name,dealt[0].suit,dealt[1].name,dealt[1].suit); printf(" the current value of the index i=%d\n",i); //this line gave me the value of i for testing d=deal[0].value+deal[1].value; p=dealt[0].value+dealt[1].value; if(d==21){ printf(" The Dealer has Blackjack! House win!\n"); }else{ if(d>21){ printf(" The dealer is Bust! You win!\n"); }else{ if(d>17){ printf(" Press 1 to HIT or 2 to STAND"); scanf("%d",k); if(k==1){ dealt[y].suit=cards[i].suit; dealt[y].name=cards[i].name; dealt[y].value=cards[i].value; y++; i++; } }else{ if(d<17){ printf(" Dealer Hits!"); deal[x].suit=cards[i].suit; deal[x].name=cards[i].name; deal[x].value=cards[i].value; x++; i++; } } } } return 0; }

    Read the article

  • how can udp data can passed through RS232 in ansi c?

    - by moon
    i want to transmit and receive data on RS232 using udp and i want to know about techniques which allow me to transmit and receive data on a faster rate and also no lose of data is there? thanx in advance. i have tried but need improvements if possible #include <stdio.h> #include <dos.h> #include<string.h> #include<conio.h> #include<iostream.h> #include<stdlib.h> #define PORT1 0x3f8 void main() { int c,ch,choice,i,a=0; char filename[30],filename2[30],buf; FILE *in,*out; clrscr(); while(1){ outportb(PORT1+0,0x03); outportb(PORT1+1,0); outportb(PORT1+3,0x03); outportb(PORT1+2,0xc7); outportb(PORT1+4,0x0b); cout<<"\n==============================================================="; cout<<"\n\t*****Serial Communication By BADR-U-ZAMAN******\nCommunication between two computers By serial port"; cout<<"\nPlease select\n[1]\tFor sending file \n[2]\tFor receiving file \n[3]\tTo exit\n"; cout<<"=================================================================\n"; cin>>choice; if(choice==1) { strcpy(filename,"C:\\TC\\BIN\\badr.cpp"); cout<<filename; for(i=0;i<=strlen(filename);i++) outportb(PORT1,filename[i]); in=fopen(filename,"r"); if (in==NULL) { cout<<"cannot open a file"; a=1; } if(a!=1) cout<<"\n\nFile sending.....\n\n"; while(!feof(in)) { buf=fgetc(in); cout<<buf; outportb(PORT1,buf); delay(5); } } else { if(choice==3) exit(0); i=0; buf='a'; while(buf!=NULL) { c=inportb(PORT1+5); if(c&1) { buf=inportb(PORT1); filename2[i]=buf; i++; } } out=fopen(filename2,"t"); cout<<"\n Filename received:"<<filename[2]; cout<<"\nReading from the port..."; cout<<"writing to file"<<filename2; do { c=inportb(PORT1+5); if(c&1) { buf=inportb(PORT1); cout<<buf; fputc(buf,out); delay(5); } if(kbhit()) { ch=getch(); } }while(ch!=27); } getch(); } }

    Read the article

  • Is there a command to test an SQL query without executing it? ( MySQL or ANSI SQL )

    - by Petruza
    Is there anything like this: TEST DELETE FROM user WHERE somekey = 45; That can return any errors, for example that somekey doesn't exist, or some constraint violation or anything, and reporting how many rows would be affected, but not executing the query? I know you can easily turn any query in a select query that has no write or delete effect in any row, but that can lead to errors and it's not very practical if you want to test and debug many queries.

    Read the article

  • how can i pass a parameter in a thread in ansi c?

    - by moon
    int NM_Generator = 1; //Aray to store thread handles HANDLE Array_Of_Thread_Handles[1]; //variable to hold handle of North pulse HANDLE Handle_Of_NM_Generator = 0; //Create NM_Generator Thread Handle_Of_NM_Generator = CreateThread( NULL, 0, NMGenerator, &dDifference, 0, NULL); if ( Handle_Of_NM_Generator == NULL) ExitProcess(NM_Generator); i want to pass a parameter double value in it how can i do so?

    Read the article

  • how can i pass a parameter in a thread in ansi c windows lib can also be used?

    - by moon
    int NM_Generator = 1; //Aray to store thread handles HANDLE Array_Of_Thread_Handles[1]; //variable to hold handle of North pulse HANDLE Handle_Of_NM_Generator = 0; //Create NM_Generator Thread Handle_Of_NM_Generator = CreateThread( NULL, 0, NMGenerator, &dDifference, 0, NULL); if ( Handle_Of_NM_Generator == NULL) ExitProcess(NM_Generator); i want to pass a parameter double value in it how can i do so?

    Read the article

  • Kingston SD reader not working for USB3

    - by user1146334
    I have a Kingston 4-in-1 Multimedia reader. When my PC was formatted with Win7 it worked fine. I decided to change to Ubuntu 14.04 and now it doesn't work. If I plug it into one of the USB2 ports it works fine, but whenever I plug it into one of the USB3 ports, it thinks about it for a minute and then dies. Here's the output of dmesg when it dies [110262.148656] usb 4-1: new SuperSpeed USB device number 3 using xhci_hcd [110262.170330] usb 4-1: Parent hub missing LPM exit latency info. Power management will be impacted. [110262.266379] usb 4-1: New USB device found, idVendor=11b0, idProduct=6348 [110262.266386] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [110262.266390] usb 4-1: Product: USB3.0 Media Reader [110262.266394] usb 4-1: Manufacturer: Kingston [110262.266398] usb 4-1: SerialNumber: 08735314400198 [110262.272929] usb-storage 4-1:1.0: USB Mass Storage device detected [110262.273239] scsi15 : usb-storage 4-1:1.0 [110263.290056] scsi 15:0:0:0: Direct-Access FCR-HS3 -0 1.00 PQ: 0 ANSI: 4 [110263.306622] scsi 15:0:0:1: Direct-Access FCR-HS3 -1 1.00 PQ: 0 ANSI: 4 [110263.323292] scsi 15:0:0:2: Direct-Access FCR-HS3 -2 1.00 PQ: 0 ANSI: 4 [110263.339858] scsi 15:0:0:3: Direct-Access FCR-HS3 -3 1.00 PQ: 0 ANSI: 4 [110263.340332] sd 15:0:0:0: Attached scsi generic sg3 type 0 [110263.340706] sd 15:0:0:1: Attached scsi generic sg4 type 0 [110263.340850] sd 15:0:0:2: Attached scsi generic sg5 type 0 [110263.340975] sd 15:0:0:3: Attached scsi generic sg6 type 0 [110264.651847] sd 15:0:0:1: [sde] 31116288 512-byte logical blocks: (15.9 GB/14.8 GiB) [110264.667049] sd 15:0:0:1: [sde] Write Protect is off [110264.667055] sd 15:0:0:1: [sde] Mode Sense: 2f 00 00 00 [110264.682767] sd 15:0:0:1: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [110264.694975] sd 15:0:0:2: [sdf] Attached SCSI removable disk [110264.697933] sd 15:0:0:3: [sdg] Attached SCSI removable disk [110264.729918] sd 15:0:0:0: [sdd] Attached SCSI removable disk [110264.754189] sde: sde1 [110264.760114] sd 15:0:0:1: [sde] Attached SCSI removable disk [110275.377368] usb 4-1: reset SuperSpeed USB device number 3 using xhci_hcd [110275.398453] usb 4-1: Parent hub missing LPM exit latency info. Power management will be impacted. [110275.436592] xhci_hcd 0000:05:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff8802e4fb9980 [110275.436600] xhci_hcd 0000:05:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff8802e4fb99c0 [110277.263444] usb 4-1: USB disconnect, device number 3

    Read the article

  • CentOS - Add additional hard drive raid arrays on Dell Perc 5/i card

    - by Quanano
    We have a Dell Poweredge 2900 system with Dell Perc 5/i card and 4 SAS hard drives attached, with NTFS partitions on them. We installed CentOS on one raid array on this controller with a different controller and it is working fine. We are now trying to access the drives shown above and they are not being shown in /dev as sdb, etc. sda is the drive that we installed centos on and it has sda1, sda2, sda3, etc. The CDROM has been picked up as well. If I scan for scsi devices then the perc and adaptec controllers are both found. sg0 is the CDROM and sg2 is the centos installed, however I think sg1 is the other drive but I cannot see anyway to mount the partitions, as only the drive is listed in /dev. Thanks. EXTRA INFO fdisk -l: Disk /dev/sda: 72.7 GB, 72746008576 bytes 255 heads, 63 sectors/track, 8844 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x11e3119f Device Boot Start End Blocks Id System /dev/sda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 64 8845 70528000 8e Linux LVM Disk /dev/mapper/vg_lal2server-lv_root: 34.4 GB, 34431041536 bytes 255 heads, 63 sectors/track, 4186 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_lal2server-lv_root doesn't contain a valid partition table Disk /dev/mapper/vg_lal2server-lv_swap: 21.1 GB, 21139292160 bytes 255 heads, 63 sectors/track, 2570 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_lal2server-lv_swap doesn't contain a valid partition table Disk /dev/mapper/vg_lal2server-lv_home: 16.6 GB, 16647192576 bytes 255 heads, 63 sectors/track, 2023 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_lal2server-lv_home doesn't contain a valid partition table These are all from the install hdd not the additional hard drives modprobe a320raid FATAL: Module a320raid not found. lsscsi -v: [0:0:0:0] cd/dvd TSSTcorp CDRWDVD TS-H492C DE02 /dev/sr0 dir: /sys/bus/scsi/devices/0:0:0:0 [/sys/devices/pci0000:00/0000:00:1f.1/host0/target0:0:0/0:0:0:0] [4:0:10:0] enclosu DP BACKPLANE 1.05 - dir: /sys/bus/scsi/devices/4:0:10:0 [/sys/devices/pci0000:00/0000:00:05.0/0000:01:00.0/0000:02:0e.0/host4/target4:0:10/4:0:10:0] [4:2:0:0] disk DELL PERC 5/i 1.03 /dev/sda dir: /sys/bus/scsi/devices/4:2:0:0 [/sys/devices/pci0000:00/0000:00:05.0/0000:01:00.0/0000:02:0e.0/host4/target4:2:0/4:2:0:0] . lsmod: Module Size Used by fuse 66285 0 des_generic 16604 0 ecb 2209 0 md4 3461 0 nls_utf8 1455 0 cifs 278370 0 autofs4 26888 4 ipt_REJECT 2383 0 ip6t_REJECT 4628 2 nf_conntrack_ipv6 8748 2 nf_defrag_ipv6 12182 1 nf_conntrack_ipv6 xt_state 1492 2 nf_conntrack 79453 2 nf_conntrack_ipv6,xt_state ip6table_filter 2889 1 ip6_tables 19458 1 ip6table_filter ipv6 322029 31 ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6 bnx2 79618 0 ses 6859 0 enclosure 8395 1 ses dcdbas 9219 0 serio_raw 4818 0 sg 30124 0 iTCO_wdt 13662 0 iTCO_vendor_support 3088 1 iTCO_wdt i5000_edac 8867 0 edac_core 46773 3 i5000_edac i5k_amb 5105 0 shpchp 33482 0 ext4 364410 3 mbcache 8144 1 ext4 jbd2 88738 1 ext4 sd_mod 39488 3 crc_t10dif 1541 1 sd_mod sr_mod 16228 0 cdrom 39771 1 sr_mod megaraid_sas 77090 2 aic79xx 129492 0 scsi_transport_spi 26151 1 aic79xx pata_acpi 3701 0 ata_generic 3837 0 ata_piix 22846 0 radeon 1023359 1 ttm 70328 1 radeon drm_kms_helper 33236 1 radeon drm 230675 3 radeon,ttm,drm_kms_helper i2c_algo_bit 5762 1 radeon i2c_core 31276 4 radeon,drm_kms_helper,drm,i2c_algo_bit dm_mirror 14101 0 dm_region_hash 12170 1 dm_mirror dm_log 10122 2 dm_mirror,dm_region_hash dm_mod 81500 11 dm_mirror,dm_log blkid: /dev/sda1: UUID="bc4777d9-ae2c-4c58-96ea-cedb342b8338" TYPE="ext4" /dev/sda2: UUID="j2wRZr-Mlko-QWBR-BndC-V2uN-vdhO-iKCuYu" TYPE="LVM2_member" /dev/mapper/vg_lal2server-lv_root: UUID="9238208a-1daf-4c3c-aa9b-469f0387ebee" TYPE="ext4" /dev/mapper/vg_lal2server-lv_swap: UUID="dbefb39c-5871-4bc9-b767-1ef18f12bd3d" TYPE="swap" /dev/mapper/vg_lal2server-lv_home: UUID="ec698993-08b7-443e-84f0-9f9cb31c5da8" TYPE="ext4" dmesg shows: megaraid_sas: fw state:c0000000 megasas: fwstate:c0000000, dis_OCR=0 scsi2 : LSI SAS based MegaRAID driver scsi 2:0:0:0: Direct-Access SEAGATE ST3146855SS S527 PQ: 0 ANSI: 5 scsi 2:0:1:0: Direct-Access SEAGATE ST3146855SS S527 PQ: 0 ANSI: 5 scsi 2:0:2:0: Direct-Access SEAGATE ST3146855SS S527 PQ: 0 ANSI: 5 scsi 2:0:3:0: Direct-Access SEAGATE ST3146855SS S527 PQ: 0 ANSI: 5 scsi 2:0:4:0: Direct-Access HITACHI HUS154545VLS300 D590 PQ: 0 ANSI: 5 scsi 2:0:5:0: Direct-Access HITACHI HUS154545VLS300 D590 PQ: 0 ANSI: 5 scsi 2:0:8:0: Direct-Access FUJITSU MBA3073RC D305 PQ: 0 ANSI: 5 scsi 2:0:9:0: Direct-Access FUJITSU MBA3073RC D305 PQ: 0 ANSI: 5 i.e. the 3 RAID Arrays Seagate Hitatchi and Fujitsu hard drives respectively. FURTHER UPDATE I have installed the megaraid storage manager console and connected to the server. It appears that the two CentOS installation hard drives are OK. The other 6 drives, one raid array of 4 and one raid array of 2 disks. The other drives are listed as (Foreign) Unconfigured Good.

    Read the article

  • Ubuntu 11.10 doesn't detect external usb hard drive

    - by Andrew
    I have been batting with this issue for a bit and cannot find the answer to it. So the Dmesg see's the device, being Symwave WDC WD64.... media@Media-pc:~$ dmesg | tail -n 20 [78678.719497] scsi 10:0:0:0: Direct-Access Generic- USB3.0 CRW -0 1.00 PQ: 0 ANSI: 0 CCS [78678.725621] scsi 10:0:0:1: Direct-Access Generic- USB3.0 CRW -1 1.00 PQ: 0 ANSI: 0 CCS [78684.073837] scsi 11:0:0:0: Direct-Access SYMWAVE WDC WD6400AAKS-0 3B01 PQ: 0 ANSI: 4 [78691.008126] scsi 11:0:0:0: uas_eh_abort_handler tag 0 [78691.008139] scsi 11:0:0:0: uas_eh_device_reset_handler tag 0 [78691.008147] scsi 11:0:0:0: uas_eh_target_reset_handler tag 0 [78691.008154] scsi 11:0:0:0: uas_eh_bus_reset_handler tag 0 [78691.080307] usb 2-2.4: reset high speed USB device number 9 using ehci_hcd [78691.221427] scsi 11:0:0:0: Device offlined - not ready after error recovery [78691.221498] scsi 11:0:0:0: rejecting I/O to offline device [78691.221519] scsi 11:0:0:0: rejecting I/O to offline device [78691.222952] scsi 11:0:0:1: Enclosure SYMWAVE SES 3B01 PQ: 0 ANSI: 4 [78691.223156] scsi 11:0:0:2: uas_sense_old: urb length 26 disagrees with IU sense data length 510, using 18 bytes of sense data [78691.225061] sd 11:0:0:0: Attached scsi generic sg3 type 0 [78691.225344] ses 11:0:0:1: Attached Enclosure device [78691.225495] ses 11:0:0:1: Attached scsi generic sg4 type 13 [78691.226266] sd 10:0:0:0: Attached scsi generic sg5 type 0 [78691.226653] sd 10:0:0:1: Attached scsi generic sg6 type 0 [78691.241647] sd 10:0:0:0: [sdd] Attached SCSI removable disk [78691.243832] sd 10:0:0:1: [sde] Attached SCSI removable disk It looks like it attaches sdd and sde. Now when i look in the disk utility it shows "Hard disk Symwave WD6400AAKS-0 device /dev/sdc doesn't show any other info then that, if i format, it says that it cannot open /dev/sdc no device or address error. Underneeth the device it does show two general usb3.0 CRW that are sdd and sde. Now if I do a fdisk -l it doesn't show the device: media@Media-pc:~$ sudo fdisk -l Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000247de Device Boot Start End Blocks Id System /dev/sda1 * 2048 152176639 76087296 83 Linux /dev/sda2 152178686 156301311 2061313 5 Extended /dev/sda5 152178688 156301311 2061312 82 Linux swap / Solaris Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x948fc822 Device Boot Start End Blocks Id System /dev/sdb1 63 1953520064 976760001 7 HPFS/NTFS/exFAT So now I am confused. Any ideas how I get fdisk to see the device?

    Read the article

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